3. notice Transparency by using setOpaque(boolean b) or AlphaComposite is diferrent with compare with Java Translucency
- there are a few code example on this Forum, Oracle tutorial, www.java2s.com (notice examples for Graphics(2D) are in most cases outdated, have to change method paint() to the paintComponent or paintChildren)
If a component is opaque, it's obligated to paint its background completely. Opacity for a given component in Swing indicates whether or not the content behind a given component is visible to the user. E.g. JButton is typically opaque because it completely "hides" whatever happens behind it. On the other hand, if you want to have a rounded button of your own, you need to make sure it is not opaque because there are things behind its bounds that should be visible. I think all Swing components are opaque by default except for JLabel.
The quieter you are, the more you are able to hear.
subject: Difference between setOpaque() and setVisible()