I have a class that extends JPanel. On the panel I have added an JLabel for a image and a few JTextArea (setEditable, setCursor, setOpaque, setFocusable to false) for text. This class is intended to be put in a list-fashion, top to bottom. When the user clicks on one of the JPanels some actions should happen depending on the selected item (JPanel). I have added an addMouseListener which works, but it wont register clicks if the user clicks somewhere where there is text. It work if I change the JTextArea to JLabel but the reason I used JTexArea is because I want/need wordwrap.
Any suggestions? Thanks.
I have a class that extends JPanel. On the panel I have added an
Share
Consider adding same mouselistener to JTextArea Also.