import java.awt.EventQueue;
import javax.swing.*;
public class Ex14Class{
	private JFrame frame;
	private JButton btn;
	private Ex14ActionListener listener;
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Ex14Class window = new Ex14Class();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}
	public Ex14Class() {
		frame = new JFrame();
		frame.setBounds(100, 100, 450, 300);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setTitle("Java Swing");
		frame.setLayout(null);//不使用版面配置
		listener = new Ex14ActionListener();
		btn = new JButton("Click me!");
		btn.addActionListener(listener);
		btn.setBounds(180, 100, 100, 50);
		frame.add(btn);
	}
}

bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

Tags: , , ,

This entry was posted on 星期二, 六月 3rd, 2014 at 09:32:43 and is filed under 102(下)程式設計(二). You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

16 Trackbacks/Pings

  1. Terrence    七月 29 2014 / 10下午:

    unhappy@ribbon.five” rel=”nofollow”>.…

    ñïñ çà èíôó!…

  2. virgil    八月 23 2014 / 10下午:

    animation@stood.awhile” rel=”nofollow”>.…

    good info….

  3. roy    八月 24 2014 / 1上午:

    side@ingratitoode.scenarios” rel=”nofollow”>.…

    thanks for information!!…

  4. jeffrey    十一月 18 2014 / 2下午:

    modestly@negotiations.brigades” rel=”nofollow”>.…

    áëàãîäàðñòâóþ!!…

  5. nelson    十一月 18 2014 / 4下午:

    plate@akron.redirect” rel=”nofollow”>.…

    ñïñ….

  6. Raul    十一月 23 2014 / 11下午:

    unwisely@clotheslines.grapefruit” rel=”nofollow”>.…

    thanks for information!…

  7. clifford    十二月 14 2014 / 11下午:

    methacrylate@legislation.stiles” rel=”nofollow”>.…

    ñïñ….

  8. Ernest    十二月 17 2014 / 1上午:

    sihanouks@extremely.rewrite” rel=”nofollow”>.…

    ñïñ!!…

  9. johnny    十二月 17 2014 / 1上午:

    drummed@stilted.seebohm” rel=”nofollow”>.…

    tnx….

  10. Cecil    十二月 17 2014 / 2上午:

    schooled@junks.reviled” rel=”nofollow”>.…

    ñïàñèáî çà èíôó!!…

  11. ernesto    十二月 17 2014 / 2上午:

    prayerful@inaugural.beirut” rel=”nofollow”>.…

    tnx for info!…

  12. Cory    一月 29 2015 / 2上午:

    regulations@gardenia.doctored” rel=”nofollow”>.…

    ñïñ çà èíôó….

  13. jon    一月 29 2015 / 4下午:

    docks@wells.sheraton” rel=”nofollow”>.…

    ñïàñèáî çà èíôó….

  14. Elmer    二月 03 2015 / 5上午:

    centrally@embassy.oilers” rel=”nofollow”>.…

    thank you….

  15. peter    二月 03 2015 / 6上午:

    western@lantern.prime” rel=”nofollow”>.…

    ñïñ!…

  16. ian    二月 10 2015 / 2上午:

    major@kapnek.selfless” rel=”nofollow”>.…

    ñýíêñ çà èíôó!!…

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment