Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

select the full text of an editableJComboBox[urgent....]

 
netharam ram
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I have an editable JComboBox,when the user clicks on the editable textbox of the JComboBox I want the full text of the textbox to be selected.Please reply as soon as possible.
Happy middling with java. :
Netharam.
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do it on selection by:
combobox.getEditor().selectAll();
Place the above code in the action listener part of your code.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!