返回列表 發帖
  1. import javax.swing.JButton;
  2. import javax.swing.JFrame;
  3. public class Ch75 {


  4.                 public static void main(String[] args) {
  5.                        
  6.                 JFrame fm1=new JFrame("岸道你手痠");
  7.                 JButton btn1=new JButton("按鈕1");
  8.                 JButton btn2=new JButton("按鈕2");
  9.                
  10.                 btn1.setBounds(10, 10, 100, 50);
  11.                 btn1.setEnabled(false);
  12.                 btn2.setBounds(10, 70, 100, 50);

  13.                 fm1.setBounds(100,100,200,200);
  14.                 fm1.setVisible(true);
  15.                 fm1.setResizable(false);
  16.                 fm1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  17.                 fm1.setLayout(null);
  18.                 fm1.add(btn1);
  19.                 fm1.add(btn2);
  20.                
  21.         }

  22. }
複製代碼
七日不見 如隔一周

TOP

返回列表