/** * A simplified way to see a JPanel or other Container. Pops up a JFrame with specified Container * as the content pane. */ public static JFrame openInJFrame( Container content, int width, int height, String title, Color bgColor) { JFrame frame = new JFrame(title); frame.setBackground(bgColor); content.setBackground(bgColor); frame.setSize(width, height); frame.setContentPane(content); frame.addWindowListener(new ExitListener()); frame.setVisible(true); return (frame); }