I was trying to paint border around JLabel
when it is clicked. Just like JButtons
are painted.
I thought it would be easy but I failed to do the job.
I tried to figure out what happens to JButtons
when clicked by putting breakpoints in source codes. But I got lost, however, I have a feeling that javax.swing.plaf
and its subpackages are what I need.
Am I right? Is there a simpler way to do the job.
Here is an example: