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