FileDocCategorySizeDatePackage
Figure3.javaAPI DocExample1062Thu Oct 24 20:14:24 BST 2002None

Figure3

public class Figure3 extends JFrame

Fields Summary
private JDesktopPane
desk
Constructors Summary
public Figure3(String title)

    super(title);
    setDefaultCloseOperation(EXIT_ON_CLOSE);

    // Create a desktop and set it as the content pane. Don't set the layered
    // pane, since it needs to hold the menubar too.
    desk = new JDesktopPane();
    setContentPane(desk);

  
Methods Summary
private voidaddFrame(int number)

	  JInternalFrame f = new JInternalFrame("Frame " + number,true,true,true,true);
	
	  f.setBounds(number * 10 - 5, number * 10 - 5, 250, 150);
	  desk.add(f, 1);
	  f.setVisible(true);
  
public static voidmain(java.lang.String[] args)

    Figure3 td = new Figure3("");

    td.setSize(300, 220);
    td.setVisible(true);
    for (int i = 1; i <= 4; i++) {
      td.addFrame(i);
    }