Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextField on a disabled JSplitPane - problem with selectAll()  RSS feed

 
Amit Rosner
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I create a JTextField, set it with some text, and then call selectAll() so the text would be selected.
Then I put it on the upper pane of a JSplitPane, and I set the JSplitPane 'setEnabled(false)', so the divider cannot be moved. But in this situation the text is not hightlighted as I wanted it to be. If I remove the 'setEnabled(false)' of the JSplitPane it works.
How can I highlight the text, and keep the JSplitPane disabled (because I want the divider to be unmovable)?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!