package three.day.frame;
import javax.swing.JDesktopPane;
import javax.swing.JFrame;
import javax.swing.JInternalFrame;
public class JInternalFrameDemo01 {
public static void main(String[] args) {
JDesktopPane desktopPane = new JDesktopPane();
JInternalFrame internalFrame = new JInternalFrame("内部框架1",true,true,true,true);
internalFrame.setBounds(10, 10, 200,200);
internalFrame.setVisible(true);
JInternalFrame internalFrame2 = new JInternalFrame("内部框架2",true,true,true,true);
internalFrame2.setBounds(150, 50, 200, 200);
internalFrame2.setVisible(true);
desktopPane.add(internalFrame);
desktopPane.add(internalFrame2);
JFrame frame = new JFrame("内部框架的使用示例");
frame.setBounds(200,300,400,300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(desktopPane);
frame.setVisible(true);
}
}