SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Originally posted by Rob Prime:
Now keep in mind that this is just quick & dirty. A better way would be to create your own subclass of AbstractButton, then use a ButtonUI to do the painting. You can use JRadioButton as an example, but strip the specific radio button behaviour.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Originally posted by Gopu Akraju:
I tried adding action listener to JLabel...
Or do I have change JLabel to any other component to achieve this?
If you want to continue with your MouseListener approach, that's
ok too.
Originally posted by Gopu Akraju:
When I click on JLabel, it gets underlined as I set the text of JLabel underlined under mousePressed listener. After this action, when I click on a button(REMOVE), I need to detect which label from the JPanel is underlined and then I should proceed from there.