Menu

#22 Removing and adding Label to BorderLayoutManager

open
Widget (8)
0.9.6
5
2012-04-09
2007-09-25
Anonymous
No

When removing a label from BorderLayoutManager by removeWidget method, replacing it with new label by addWidget method, a runtime exception is thrown.

java.lang.NullPointerException
at jcurses.widgets.Widget.getSize(Widget.java:176)
at jcurses.widgets.Label.doPaint(Label.java:75)
at jcurses.widgets.Widget.paint(Widget.java:205)
at jcurses.widgets.WidgetContainer.doPaint(WidgetContainer.java:51)
at jcurses.widgets.Widget.paint(Widget.java:205)

The size of label is undefined.

Thanks for solution.

Mike M.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.