[Top][All Lists]

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

[bug-classpath] [bug #13617] swing: DefaultStyledDocument(new StyleConte

From: Audrius Meškauskas
Subject: [bug-classpath] [bug #13617] swing: DefaultStyledDocument(new StyleContext()) throws NullPointerException
Date: Tue, 5 Jul 2005 13:59:20 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Update of bug #13617 (project classpath):

                  Status:                    None => Fixed                  
             Assigned to:                    None => audriusa               
             Open/Closed:                    Open => Closed                 


Follow-up Comment #1:

The reason of throwing that exception is that DefaultStyledDocument
constructor tries to set the default style of the newly created StyledContext
as its logical style. To get that style, it calls
StyledContext.getStyle(StyleContext.DEFAULT_STYLE) and receives
null in return. The attempt to add that null to the table raises an exception.
After the path below the provided test case does not longer throw an exception
and the empty frame appears.

2005-07-05  Audrius Meskauskas  <address@hidden>

* javax/swing/text/StyleContext.java
(defaultStyle): New field.
(constructor): Add defaultStyle to the styleTable.
(DEFAULT_STYLE, getStyle, getStyleNames): Documented. 


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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