java applet小问题
程序代码:
package applet; import java.applet.*; import java.awt.*; public class Exam6_4 extends Applet { /** * */ private static final long serialVersionUID = 7453078616621241814L; int x; int y; public void init() { x = Integer.parseInt(getParameter("x")); y = Integer.parseInt(getParameter("y")); } public void paint(Graphics g) { g.drawString("hello world", x, y); } }
错误信息如下。哪位大神来看看
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:542)
at java.lang.Integer.parseInt(Integer.java:615)
at applet.Exam6_4.init(Exam6_4.java:17)
at sun.applet.AppletPanel.run(AppletPanel.java:434)
at java.lang.Thread.run(Thread.java:745)