摘要: import javax.swing.JFrame;public class WindowOnTop { public static void main(String[] args) { JFrame frame =new JFrame("MyJFrame!"); frame.setBounds(200,200,300,300); frame.setVisible(true); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setAlwaysOnTop(true);//将窗口置顶}} 阅读全文
posted @ 2011-12-02 21:40 氺〤魚Oo。 阅读(1085) 评论(0) 推荐(0) 编辑
摘要: import java.lang.Thread;//引入线程类public class MyThread { public static void main(String[] args) { //用实现线程接口的类创建线程并执行线程 testThread helloThread =new testThread(); Thread myThread=new Thread(helloThread);//注意构造函数的写法 myThread.start();//执行线程 }}//实现线程接口的类class testThread implements Runnable{//重... 阅读全文
posted @ 2011-12-02 20:44 氺〤魚Oo。 阅读(118) 评论(0) 推荐(0) 编辑