I am working on a swing gui project. I want to autopopulate in
JTextField mean whenever i type a letter any matching string from an
array comes in the Jtextfield. I have one problem in using backspace
features. Whenever i am pressing backspace it works only one time. I
am using stringbuffer to store typed letters. When i am pressing the
backspace i am removing one character from Stringbuffer and decrement
its size by one by deleteCharAt() method. Here the problem is this
when i am pressing backspace two times consecutively it gives me
error StringIndexOutofBound. Please help me i will really appreciate
that.