Mouse « JTextArea « Java Swing Q&A





1. how to select a line in a Jtextarea?    stackoverflow.com

I have a jtextarea that is not editable. It has some text in it. What i want is that when a user clicks in the jtextarea, (preferably single click), the entire ...

2. How to draw a box around the text when i've selected the text with mouse in Text area?    stackoverflow.com

I have used

textArea1=new TextArea();
String s=textArea1.getSelectedText();
g.drawRect(s.length(),s.length(),s.length(),s.length());
but its not working as expected.

3. Text-mouseover popups over a Swing JTextArea?    stackoverflow.com

Is there anything out there that allows you to show a small text popup window (like a tooltip) over individual words or letters in a Swing JTextArea? (Or a JTextArea alternative ...

4. differentiating dragging and selecting in Java's JTextArea    stackoverflow.com

My Java application has several JTextAreas that the user can move around. I achieve this by adding a mouse motion drag listener to it.

  public void mouseDragged(MouseEvent e) {
  ...

7. MouseListener in JTextArea    forums.oracle.com

I have JFrame->JPanel->JTextArea In the JTextArea I have specific words/tokens (highlighted in colour). Now when I move mouse on these words I want a Popup window displaying and Image. This popup should disapper when I move the mouse away from these words. Each of these specific words have a different image associated with it. I don't know how to go about ...