读书人

退出页面时applet报错,该如何处理

发布时间: 2012-01-26 19:40:46 作者: rapoo

退出页面时applet报错
在页面中嵌入一个applet,打开页面时没有错误,当离开这个页面applet 控制台报错:java.lang.IllegalArgumentException: Width (1) and height (0) cannot be <= 0

at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)

at java.awt.image.BufferedImage. <init> (Unknown Source)

at sun.awt.windows.WComponentPeer.print(Unknown Source)

at sun.awt.windows.WCanvasPeer.print(Unknown Source)

at sun.awt.windows.WPanelPeer.print(Unknown Source)

at java.awt.GraphicsCallback$PeerPrintCallback.run(Unknown Source)

at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)

at java.awt.Component.printAll(Unknown Source)

at java.awt.GraphicsCallback$PrintAllCallback.run(Unknown Source)

at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)

at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)

at java.awt.Container.printComponents(Unknown Source)

at sun.awt.windows.WEmbeddedFrame.print(Unknown Source)


[解决办法]
检查你的Width和height参数是否传递正确
这两个参数是不能小于0的
[解决办法]
height (0)

读书人网 >J2SE开发

热点推荐