• Post Reply Bookmark Topic Watch Topic
  • New Topic

Custom ComboBoxEditor issues  RSS feed

 
Jennifer Sohl
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I have a couple of questions on using my own ComboBoxEditor. I have a class that I created with some custom methods in it which extends JTextField (SKTextField) which I am using for my customer ComboBoxEditor. It works with the exception of a couple of things:
- Before, using the default ComboBoxEditor, I could hit enter on the drop down list in the JComboBox and it would automatically select the item I chose. With the custom one, it does not do this.
- Also, now using the custom editor, when I tab out of the combo box, I have to press tab twice to get it to go to the next component. Before, I just pressed tab once, and it went on.
What else do I need to do? Here's my custom editor:

Thanks for any help!!
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your class extends JTextField (thus it is a JTextField) and then creates and adds a JTextField to itself. It runs okay with the changes made below. I never could get it to misbehave with selecting and tabbing.
 
Jennifer Sohl
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops! Now I see the problem. Thanks for the help Craig!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!