dcsimg

Can I make an AWT Panel transparent?

Scott Stanchfield

You can create a subclass of Container:

public class TransparentPanel
       extends Container {
  public TransparentPanel() {}
  public TransparentPanel(LayoutManager m) {
    super(m);
   }
}

That will be transparent. Note that you still need a top-level non-transparent Frame or Applet for this to sit in.