JTextField on a disabled JSplitPane - problem with selectAll()
posted 14 years ago
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)?