退出页面时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)