Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

backspace

  Asked By: Kaua    Date: Sep 11    Category: Java    Views: 510
  

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.

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on backspace Or get search suggestion and latest updates.




Tagged: