如何改成应用程序?应该注意那些问题!! 把这个APPLET放到JFRAME里的就可以了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我想学习如何把APPLET改成应用程序 public class SimpleBanner extends JFrame implements Runnable {//changed by newman String msg = " A Simple Moving Banner."; Thread t = null; int state; boolean stopFlag;public void init() { setBackground(Color.cyan); setForeground(Color.red); }public void start() { t = new Thread(this); stopFlag = false; t.start(); } public SimpleBanner (){//changed by newman init(); } public static void main(String args[]) {//changed by newman SimpleBanner t=new SimpleBanner (); t.start(); t.pack(); t.show(); }public void run() { char ch;for( ; ; ) { try { repaint(); Thread.sleep(250); ch = msg.charAt(0); msg = msg.substring(1, msg.length()); msg += ch; if(stopFlag) break; } catch(InterruptedException e) {} } }public void stop() { stopFlag = true; t = null; }public void paint(Graphics g) { g.drawString(msg, 50, 30); }} 大神看看能不能实现 将十进制的三原色转化成为RGB十六进制数 JTree节点相关信息的储存问题 JColorChooser 一个非常头疼的问题 关于用程序打开word,pdf等文档的问题,谢谢指教. 如何在sun solaris8上安装jre或jdk?我安装老是出问题! 请教取字符串中数字问题? 新手上路,请多关照!!!! 请大哥大姐,等各路高手给看看这段代码,谢谢了 sos!!!!请问我想用jdbc-odbc访问access数据库应如何配置我的classpath? Point类能否触发鼠标事件 如何用Jbuilder7在菜单上添加图标,用可视化方式
String msg = " A Simple Moving Banner.";
Thread t = null;
int state;
boolean stopFlag;
public void init() {
setBackground(Color.cyan);
setForeground(Color.red);
}
public void start() {
t = new Thread(this);
stopFlag = false;
t.start();
} public SimpleBanner (){//changed by newman
init();
} public static void main(String args[]) {//changed by newman
SimpleBanner t=new SimpleBanner ();
t.start();
t.pack();
t.show();
}public void run() {
char ch;
for( ; ; ) {
try {
repaint();
Thread.sleep(250);
ch = msg.charAt(0);
msg = msg.substring(1, msg.length());
msg += ch;
if(stopFlag)
break;
} catch(InterruptedException e) {}
}
}
public void stop() {
stopFlag = true;
t = null;
}
public void paint(Graphics g) {
g.drawString(msg, 50, 30);
}
}