- import javax.swing.JFrame;
- public class AA{
- public static void main(String[] args) {
- JFrame x=new JFrame("我的第一個視窗");
- x.setBounds(100,100,200,200);
- x.setVisible(true);
- x.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE);
- x.setResizable(true);
- JFrame y=new JFrame("我的第二個視窗");
- y.setBounds(300,100,200,200);
- y.setVisible(true);
- y.setDefaultCloseOperation( JFrame.HIDE_ON_CLOSE);
- y.setResizable(true);
- JFrame z=new JFrame("我的第三個視窗");
- z.setBounds(500,100,200,200);
- z.setVisible(true);
- z.setDefaultCloseOperation( JFrame.HIDE_ON_CLOSE);
- z.setResizable(true);
- }
- }
複製代碼 |