bug-classpath
[Top][All Lists]
Advanced

[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:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13617>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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