StyledLabel setIcon

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

StyledLabel setIcon

Postby dodwad » Tue Dec 12, 2006 11:58 pm

StyledLabel does not support icons. I can use JLabel to setIcon() and setText(null) and I have a method to check in case the text is null I expand the image to the size of the JLabel, but with StyledLabel it get the following error

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.jidesoft.plaf.basic.BasicStyledLabelUI.buildStyledText(Unknown Source)
at com.jidesoft.plaf.basic.BasicStyledLabelUI.getPreferredSize(Unknown Source)
at com.jidesoft.plaf.basic.BasicStyledLabelUI.layoutCL(Unknown Source)
at javax.swing.plaf.basic.BasicLabelUI.paint(Unknown Source)
at javax.swing.plaf.ComponentUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
dodwad
 
Posts: 22
Joined: Mon May 16, 2005 1:13 am

Postby JIDE Support » Wed Dec 13, 2006 9:16 am

I'll fix the NPE. For now, please call setText("") instead of setting it to null.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Postby JIDE Support » Wed Dec 27, 2006 11:05 am

Just so you know, this is fixed in 1.9.4.06 release.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 74 guests