bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug swing/28922] New: putting HTML into JButton provokes NPE


From: thebohemian at gmx dot net
Subject: [Bug swing/28922] New: putting HTML into JButton provokes NPE
Date: 1 Sep 2006 08:34:38 -0000

I get a NullPointerException when a JButton tries to use HTML content:

new JButton("<html>foo</html>");

the exception:
java.lang.NullPointerException
   at javax.swing.text.View.getAttributes(View.java:212)
   at
javax.swing.text.html.ViewAttributeSet.getResolveParent(ViewAttributeSet.java:159)
   at
javax.swing.text.html.ViewAttributeSet.getAttribute(ViewAttributeSet.java:139)
   at
javax.swing.text.html.ViewAttributeSet.getAttribute(ViewAttributeSet.java:141)
   at
javax.swing.text.html.ViewAttributeSet.getAttribute(ViewAttributeSet.java:141)
   at
javax.swing.text.html.ParagraphView.setPropertiesFromAttributes(ParagraphView.java:120)
   at javax.swing.text.html.ParagraphView.setParent(ParagraphView.java:94)
   at javax.swing.text.CompositeView.replace(CompositeView.java:214)
   at javax.swing.text.BoxView.replace(BoxView.java:228)
   at javax.swing.text.CompositeView.loadChildren(CompositeView.java:123)
   at javax.swing.text.CompositeView.setParent(CompositeView.java:138)
   at javax.swing.text.html.BlockView.setParent(BlockView.java:83)
   at javax.swing.text.CompositeView.replace(CompositeView.java:214)
   at javax.swing.text.BoxView.replace(BoxView.java:228)
   at javax.swing.text.CompositeView.loadChildren(CompositeView.java:123)
   at javax.swing.text.CompositeView.setParent(CompositeView.java:138)
   at javax.swing.text.html.BlockView.setParent(BlockView.java:83)
   at javax.swing.plaf.basic.BasicHTML$HTMLRootView.setView(BasicHTML.java:149)
   at javax.swing.plaf.basic.BasicHTML$HTMLRootView.<init>(BasicHTML.java:109)
   at javax.swing.plaf.basic.BasicHTML.createHTMLView(BasicHTML.java:418)
   at javax.swing.plaf.basic.BasicHTML.updateRenderer(BasicHTML.java:450)
   at
javax.swing.plaf.basic.BasicButtonListener.propertyChange(BasicButtonListener.java:155)
   at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:388)
   at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:332)
   at java.awt.Component.firePropertyChange(Component.java:5099)
   at javax.swing.AbstractButton.setText(AbstractButton.java:1654)
   at javax.swing.AbstractButton.init(AbstractButton.java:964)
   at javax.swing.JButton.<init>(JButton.java:135)
   at javax.swing.JButton.<init>(JButton.java:122)
   (...)


-- 
           Summary: putting HTML into JButton provokes NPE
           Product: classpath
           Version: 0.92
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: swing
        AssignedTo: roman at kennke dot org
        ReportedBy: thebohemian at gmx dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28922





reply via email to

[Prev in Thread] Current Thread [Next in Thread]