Hello! Maybe someone can help me out with this one.
I have a GTextArea (extends JTextArea) that some text is typed into. I have created a search/replace method that searches the text and puts results into a JTable. When a user double clicks on a result in the table, the text in the GTextArea (corresponding to the "find" in the table) is supposed to be highlighted. But that's not happening.
The included method is triggered by a mouse event (double-click with button 1) on a row in a JTable. It pulls a row (Vector) from a TableModel and pulls a GTextArea from that vector. Then a range of text from that GTextArea is explicitly selected, using setSelectionStart()/End().
The text range is successfully selected (verified by doing a replace on the selected range), but no highlighting takes place. Is there something I'm missing?
I have a GTextArea (extends JTextArea) that some text is typed into. I have created a search/replace method that searches the text and puts results into a JTable. When a user double clicks on a result in the table, the text in the GTextArea (corresponding to the "find" in the table) is supposed to be highlighted. But that's not happening.
The included method is triggered by a mouse event (double-click with button 1) on a row in a JTable. It pulls a row (Vector) from a TableModel and pulls a GTextArea from that vector. Then a range of text from that GTextArea is explicitly selected, using setSelectionStart()/End().
The text range is successfully selected (verified by doing a replace on the selected range), but no highlighting takes place. Is there something I'm missing?