高手同志帮我编译一下代码,顺便帮我修改一下哈,必有重谢!!
本人qq61570442,帮忙了的我将提供qq游戏币,买衣服(随你挑)
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class TestFrame extend JFrame{
public JPanel testPanel=null;
public JButton testButton=null;
public JFrame testFrame=null;
public TestFrme(){
try{
UIManager.setLookAndFeel(
"com.sun.java.swing.plaf.windows.windowsLookAndFeel");
}
catch(Exception ex){
System.out.println("Exception:"+ex);
}
testFrame=this;
Dimension dimension=Toolkot.getDefaultToolkit().getScreensize();
setSize(dimensions.width/2,dimensions.height/2);
setLocation(dimensions.width/2-dimensions.width/4,dimensions.height/2-dimensions.height/4);
testPanel=new JPanel();
testButton=new JButton("开始线程");
testPanel.add(testButton);
getcontentPanel().add(testPanel);
testButton.addActionListener(new java.awt.event.ActionListener(){
public void actionPerformed(ActionEvent e){
testThread testThread=new TestThread();
testThread.strat();
(new ThreadDiag(testFrame,testThread,"正在执行,请等待....")).strat();
}
});
addwindowListener(new windowAdapter(){
public void windowClosing(windowEvent e){
System.exit(0);
}
});
}
public static void main(Sting[] args){
testFrmae testFrame2=new TestFrmae();
testFrame2.setTitle("线程等待测试");
testFrmae2.show();
}
}