-
Bug
-
Resolution: Fixed
-
P2
-
1.3.1, 1.4.0
-
beta
-
generic, x86
-
generic, windows_2000
-
Verified
Tested with Merlin b38 on Solaris 2.6 Sparc/x86 and Windows.
In merlin b38, when using appletviewer to startup a application,
then choose print from Applet menu, there will be some error message like below.
--------------------------------------------------------------------------------------
Exception occurred during event dispatching:
java.lang.NullPointerException
at javax.swing.plaf.metal.MetalLookAndFeel.getControlShadow(MetalLookAndFeel.java:1160)
at javax.swing.plaf.metal.MetalBorders$MenuBarBorder.paintBorder(MetalBorders.java:254)
at javax.swing.JComponent.paintBorder(JComponent.java:588)
at javax.swing.JMenuBar.paintBorder(JMenuBar.java:315)
at javax.swing.JComponent.printBorder(JComponent.java:815)
at javax.swing.JComponent.paint(JComponent.java:694)
at javax.swing.JComponent.print(JComponent.java:772)
at javax.swing.JComponent.paintChildren(JComponent.java:540)
at javax.swing.JComponent.printChildren(JComponent.java:802)
at javax.swing.JComponent.paint(JComponent.java:701)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:548)
at javax.swing.JComponent.print(JComponent.java:772)
at javax.swing.JComponent.paintChildren(JComponent.java:540)
at javax.swing.JComponent.printChildren(JComponent.java:802)
at javax.swing.JComponent.paint(JComponent.java:701)
at javax.swing.JComponent.print(JComponent.java:772)
at java.awt.GraphicsCallback$PrintCallback.run(GraphicsCallback.java:35)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:63)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:100)
at java.awt.Container.print(Container.java:1091)
at sun.awt.motif.MComponentPeer.print(MComponentPeer.java:273)
at sun.awt.motif.MPanelPeer.print(MPanelPeer.java:41)
at java.awt.GraphicsCallback$PeerPrintCallback.run(GraphicsCallback.java:88)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:63)
at java.awt.Component.printAll(Component.java:2407)
at sun.applet.AppletViewer.appletPrint(AppletViewer.java:688)
at sun.applet.AppletViewer.processUserAction(AppletViewer.java:834)
at sun.applet.AppletViewer$UserActionListener.actionPerformed(AppletViewer.java:131)
at java.awt.MenuItem.processActionEvent(MenuItem.java:540)
at java.awt.MenuItem.processEvent(MenuItem.java:504)
at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:276)
at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:266)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:425)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
------------------------------------------------------------------------------------------
To reproduce,
1. compile attached JAppletTest.java with Merlin_b38.
2. execute 'appletviewer JAppletTest_eng.html'
3. select print from 'Applet' menu
or
1. execute Clock demo.
2. select print from 'Applet' menu
This problem is related with BugID 4371770.
In merlin b38, when using appletviewer to startup a application,
then choose print from Applet menu, there will be some error message like below.
--------------------------------------------------------------------------------------
Exception occurred during event dispatching:
java.lang.NullPointerException
at javax.swing.plaf.metal.MetalLookAndFeel.getControlShadow(MetalLookAndFeel.java:1160)
at javax.swing.plaf.metal.MetalBorders$MenuBarBorder.paintBorder(MetalBorders.java:254)
at javax.swing.JComponent.paintBorder(JComponent.java:588)
at javax.swing.JMenuBar.paintBorder(JMenuBar.java:315)
at javax.swing.JComponent.printBorder(JComponent.java:815)
at javax.swing.JComponent.paint(JComponent.java:694)
at javax.swing.JComponent.print(JComponent.java:772)
at javax.swing.JComponent.paintChildren(JComponent.java:540)
at javax.swing.JComponent.printChildren(JComponent.java:802)
at javax.swing.JComponent.paint(JComponent.java:701)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:548)
at javax.swing.JComponent.print(JComponent.java:772)
at javax.swing.JComponent.paintChildren(JComponent.java:540)
at javax.swing.JComponent.printChildren(JComponent.java:802)
at javax.swing.JComponent.paint(JComponent.java:701)
at javax.swing.JComponent.print(JComponent.java:772)
at java.awt.GraphicsCallback$PrintCallback.run(GraphicsCallback.java:35)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:63)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:100)
at java.awt.Container.print(Container.java:1091)
at sun.awt.motif.MComponentPeer.print(MComponentPeer.java:273)
at sun.awt.motif.MPanelPeer.print(MPanelPeer.java:41)
at java.awt.GraphicsCallback$PeerPrintCallback.run(GraphicsCallback.java:88)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:63)
at java.awt.Component.printAll(Component.java:2407)
at sun.applet.AppletViewer.appletPrint(AppletViewer.java:688)
at sun.applet.AppletViewer.processUserAction(AppletViewer.java:834)
at sun.applet.AppletViewer$UserActionListener.actionPerformed(AppletViewer.java:131)
at java.awt.MenuItem.processActionEvent(MenuItem.java:540)
at java.awt.MenuItem.processEvent(MenuItem.java:504)
at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:276)
at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:266)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:425)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:122)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:118)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
------------------------------------------------------------------------------------------
To reproduce,
1. compile attached JAppletTest.java with Merlin_b38.
2. execute 'appletviewer JAppletTest_eng.html'
3. select print from 'Applet' menu
or
1. execute Clock demo.
2. select print from 'Applet' menu
This problem is related with BugID 4371770.
- duplicates
-
JDK-4765376 REGRESSION: wrong AppContext causes NPE in MetalLookAndFeel.getTheme
- Closed
- relates to
-
JDK-4371770 Can't print with appletviewer in merlin b32
- Closed