obj.show()前会有个黄色的问号
import java.awt.*;
public class windowTest {
public static void main(String[] args) {
Frame obj = new Frame("MyFrame");
obj.setSize(500, 300); //设置大小
obj.setLocation(200, 200); //设置坐标
obj.show();
}
}
为何在obj.show()前会有个黄色的问号,并提示下列错误,但是程序运行正常,(JDK为1.5,在Jbuilder中调试)
"windowTest.java": [deprecation] show() in java.awt.Window has been deprecated at line 36, column 9