This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript 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)?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!