Bug 24078 - Cannot create JColorChooser due to NPE (getFontMetrics)
Cannot create JColorChooser due to NPE (getFontMetrics)
Status: RESOLVED DUPLICATE of bug 24077
Product: classpath
Classification: Unclassified
Component: swing
unspecified
: P2 normal
: ---
Assigned To: Lillian Angel
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-27 08:50 UTC by Norman Hendrich
Modified: 2005-09-27 20:34 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-09-27 19:13:58


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Norman Hendrich 2005-09-27 08:50:20 UTC
Sorry for flooding you with the same bug... Compile and start the classpath
Swing demo, then click the colorchooser button (jamvm 1.3.2 and classpath
cvs 2005.09.27):

examples/swing> jamvm gnu.classpath.examples.swing.Demo
Exception during event dispatch:
java.lang.NullPointerException
   at gnu.java.awt.peer.gtk.GdkFontMetrics.<init> (GdkFontMetrics.java:69)
   at gnu.java.awt.peer.gtk.GdkGraphics.getFontMetrics (GdkGraphics.java:328)
   at java.awt.Graphics.getFontMetrics (Graphics.java:196)
   at javax.swing.colorchooser.DefaultPreviewPanel$PreviewBorder.paintBorder
(DefaultPreviewPanel.java:116)
   at javax.swing.JComponent.paintBorder (JComponent.java:1496)
   at javax.swing.JComponent.paint (JComponent.java:1476)
   at javax.swing.colorchooser.DefaultPreviewPanel.paint
(DefaultPreviewPanel.java:174)
   at javax.swing.JComponent.paintChildren (JComponent.java:1538)
   at javax.swing.JComponent.paint (JComponent.java:1475)
   at javax.swing.JComponent.paintChildren (JComponent.java:1538)
   at javax.swing.JComponent.paint (JComponent.java:1475)
   at javax.swing.JComponent.paintChildren (JComponent.java:1538)
   at javax.swing.JComponent.paint (JComponent.java:1475)
   at javax.swing.JComponent.paintChildren (JComponent.java:1538)
   at javax.swing.JComponent.paint (JComponent.java:1475)
   at javax.swing.JLayeredPane.paint (JLayeredPane.java:687)
   at javax.swing.JComponent.paintChildren (JComponent.java:1538)
   at javax.swing.JComponent.paint (JComponent.java:1475)
   at javax.swing.JComponent.paintDoubleBuffered (JComponent.java:1664)
   at javax.swing.JComponent.paint (JComponent.java:1469)
   at java.awt.Container$GfxPaintVisitor.visit (Container.java:1817)
   at java.awt.Container.visitChild (Container.java:1621)
   at java.awt.Container.visitChildren (Container.java:1583)
   at java.awt.Container.paint (Container.java:769)
   at gnu.java.awt.peer.gtk.GtkComponentPeer.handleEvent (GtkComponentPeer.java:313)
   at java.awt.Component.dispatchEventImpl (Component.java:4843)
   at java.awt.Container.dispatchEventImpl (Container.java:1644)
   at java.awt.Window.dispatchEventImpl (Window.java:623)
   at java.awt.Component.dispatchEvent (Component.java:2341)
   at java.awt.EventQueue.dispatchEvent (EventQueue.java:475)
   at java.awt.EventDispatchThread.run (EventDispatchThread.java:75)
Comment 1 Lillian Angel 2005-09-27 20:34:47 UTC

*** This bug has been marked as a duplicate of 24077 ***