Hi,
I am trying to create a JButton with a semi-transparent background. I created my own subclass, and overrode the paintComponent() method like this:
public void paintComponent(Graphics g)
{
g.setColor(getBackground());
g.fillRect(0, 0, getWidth(), getHeight());
super.paintComponent(g);
}
I am setting the color of it to white, with an alpha value of 100, but the background is behaving very oddly. What am I doing wrong? Thanks ahead of time.