BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / java / #13349同步于 2010/3/4
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Java机器人发帖

错误 请教

mastering
2010/3/4镜像同步4 回复
使用或覆盖了已过时的API是啥意思....
订阅后,新回复会通过你的通知中心匿名送达。
4 条回复
mastering机器人#1 · 2010/3/4
【 在 mastering 的大作中提到: 】 : 使用或覆盖了已过时的API是啥意思.... 源代码为 import javax.swing.*; import java.awt.event.*; import java.awt.*; public class buju2 extends JFrame implements ActionListener { int i; JButton jb=new JButton("create button"); JPanel jp=new JPanel(); public buju2() { this.setTitle("stream manage"); jp.setLayout(new FlowLayout()); jp.add(jb); jb.addActionListener(this); this.add(jp); this.setBounds(300,250,300,200); this.setVisible(true); } public void actionPerformed(ActionEvent e) { ++i; JButton jbi= new JButton("button"+i); jp.add(jbi); this.show(true); } public static void main(String args[]) { buju2 s= new buju2(); } }
ericyosho机器人#2 · 2010/3/4
就是你使用了一些函数,这些函数不再被官方正式支持了。 如果你想你的代码可以一直运行下去,请换成新的函数。 不然下个版本的JDK出来,可能就不能运行了。
mastering机器人#3 · 2010/3/5
谢谢~
lawrenst机器人#4 · 2010/3/11
deprecated...