当前位置: 代码迷 >> Java相关 >> 多线程编程问题
  详细解决方案

多线程编程问题

热度:327   发布时间:2006-05-06 01:01:00.0
多线程编程问题

高手同志帮我编译一下代码,顺便帮我修改一下哈,必有重谢!!

本人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();

}
}

搜索更多相关的解决方案: 线程  

----------------解决方案--------------------------------------------------------
你这个程序到处都有错,并且都是拼写错误,自己好好改改吧
连extends都写错了
还有String,Toolkit,变量名取的时候是一个名字,用的时候又是一个名字
错误太多了。
----------------解决方案--------------------------------------------------------

晕 没法改 连类都没有就创建对象了 frame都写错了


----------------解决方案--------------------------------------------------------

----------------解决方案--------------------------------------------------------
我看不懂,呵呵~不过我发现不少的拼写错误哌!
----------------解决方案--------------------------------------------------------
  相关解决方案