Ok so this was a problem I stumbled upon when I wanted to use transparency..
So the code for changing background on hover is this...
received.setMouseListener(new MouseAdapter()
@Override
public void mouseEntered(MouseEvent me)
{
received.setBackground(new Color(50,50,50,100));
}
});
At the beginning I set the blue color for the button..
Here's the gif showing the color changes...
GifMeme09541718022016.gif https://drive.google.com/file/d/0B9XFyaTVy8oYci1zMmRhMmtYcnM/view?usp=docslist_api
Why does this happen? If this is not a correct approach what is the correct approach?
See Question&Answers more detail:os