i have problem to change JLabel color. i am using three JLabel
variables . i am putting mouse event on this JLabel
variables. i run the and both are changes color when i am entring mouse on JLabels
. i whis is that, at the time one JLabel
change the color when I am entering the mouse on JLabel
variable.
please solve this problem.
entry.addMouseListener(this);
entry.setOpaque(true);
profile.addMouseListener(this);
profile.setOpaque(true);
public void mouseClicked(MouseEvent mc)
{
}
public void mouseEntered(MouseEvent me)
{
entry.setBackground(color);
profile.setBackground(color);
}
public void mouseExited(MouseEvent me)
{
entry.setBackground(Color.white);
profile.setBackground(Color.white);
}
public void mousePressed(MouseEvent mp)
{
}
public void mouseReleased(MouseEvent mr)
{
}