FileDocCategorySizeDatePackage
SimpleInternalFrame.javaAPI DocExample1978Thu Oct 24 20:14:20 BST 2002None

SimpleInternalFrame

public class SimpleInternalFrame extends Frame

Fields Summary
JButton
openButton
JButton
macButton
JButton
javaButton
JButton
motifButton
JButton
winButton
JLayeredPane
desktop
JInternalFrame
internalFrame
Constructors Summary
public SimpleInternalFrame()

    super("Internal Frame Demo");
    setSize(500,400);
    openButton = new JButton("Open");
    macButton = new JButton("Mac");
    javaButton = new JButton("Metal");
    motifButton = new JButton("Motif");
    winButton = new JButton("Windows");
    Panel p = new Panel();
    p.add(openButton);
    p.add(macButton);
    p.add(javaButton);
    p.add(motifButton);
    p.add(winButton);
    add(p, BorderLayout.SOUTH);
    addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        System.exit(0);
      }
    });
    openButton.addActionListener(new OpenListener());
    LnFListener lnf = new LnFListener(this);
    macButton.addActionListener(lnf);
    javaButton.addActionListener(lnf);
    motifButton.addActionListener(lnf);
    winButton.addActionListener(lnf);

    // Set up the layered pane
    desktop = new JDesktopPane();
    desktop.setOpaque(true);
    add(desktop, BorderLayout.CENTER);
  
Methods Summary
public static voidmain(java.lang.String[] args)

    SimpleInternalFrame sif = new SimpleInternalFrame();
    sif.setVisible(true);