0

Hi!

There is JPanel with multiple JLabel components. I would like to change the border color of JLabel component that is clicked on. I tried this.getComponentAt(e.getX(), e.getY()).setBorder(solidBorder) , but it did not work... How could I solve this task?

Edited by LianaN: n/a

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by LianaN
0

I created a class that extends ArrayList and implements MouseListener. The ArrayList contains JLabel components. So, the problem is solved:)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.