package edu.princeton.swing; import java.awt.*; import javax.swing.*; /** * PTransparentPanel is just like a JPanel except that it doesn't fill the background with its * background color. * * @author btsang * @version 7.1 */ public class PTransparentPanel extends JComponent { /** * Constructs a new PTransparentPanel. */ public PTransparentPanel(LayoutManager layout) { super(); setOpaque(false); setDoubleBuffered(true); setLayout(layout); } /** * Constructs a new PTransparentPanel. */ public PTransparentPanel() { this (new FlowLayout()); } }