FileDocCategorySizeDatePackage
SheetableJFrame.javaAPI DocExample959Mon Jan 09 11:02:00 GMT 2006None

SheetableJFrame

public class SheetableJFrame extends JFrame

Fields Summary
JComponent
sheet
JPanel
glass
Constructors Summary
public SheetableJFrame(String name)

        super(name);
        glass = (JPanel) getGlassPane();
    
Methods Summary
public voidhideSheet()

        glass.setVisible(false);
    
public javax.swing.JComponentshowJDialogAsSheet(javax.swing.JDialog dialog)

        sheet = (JComponent) dialog.getContentPane();
        sheet.setBackground (Color.red);
        glass.setLayout (new GridBagLayout());
        sheet.setBorder (new LineBorder(Color.black, 1));
        glass.removeAll();
        GridBagConstraints gbc = new GridBagConstraints();
        gbc.anchor = GridBagConstraints.NORTH;
        glass.add (sheet, gbc);
        gbc.gridy=1;
        gbc.weighty = Integer.MAX_VALUE;
        glass.add (Box.createGlue(), gbc);
        glass.setVisible(true);
        return sheet;