Why the text in JTextPane cannot be selected programmatically if there is a JTextField present? Has something to do with focus i think. Thx.
import java.awt.Flow
The text in the JTextPane
is selected. The trouble is that it does not give any visual indication unless the component is focused. Try tabbing to the component once the GUI is shown.
so, i should release note this?
No, you should redesign your broken GUI that uses text selection to identify text of interest. Text selection is more something for the end user to do, not the application.
Given JTextPane
is a component that supports formatting, possibly make the text bold or italic for instance.