Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextField on a disabled JSplitPane - problem with selectAll()

 
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)?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!