Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3508 Members - Latest Member: NevilleKemp

26. May 2012, 06:42:59 pm
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)NullPointerException with HUD ComboBox
Pages: [1]
Print
Author Topic: NullPointerException with HUD ComboBox  (Read 660 times)
horati
Global Moderator
Getting respectable
*****
Offline Offline

Posts: 393


View Profile
« on: 19. February 2007, 03:34:08 pm »

Not sure what changed but I got NPE when trying to construct a ComboBox.  Since it was my first X3D combo, I just copy/pasted the code from Hud3DTest.  Indeed Hud3DTest dies too.

Quote
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at org.xith3d.ui.hud.widgets.BorderWidget.<init>(BorderWidget.java:666)
        at org.xith3d.ui.hud.widgets.List.<init>(List.java:1273)
        at org.xith3d.ui.hud.widgets.ComboBox.<init>(ComboBox.java:615)
        at org.xith3d.ui.hud.widgets.ComboBox.<init>(ComboBox.java:660)
        at org.xith3d.ui.hud.widgets.ComboBox.<init>(ComboBox.java:692)
        at org.xith3d.test.ui.HUD3DTest$TestListFrame.<init>(HUD3DTest.java:292)
        at org.xith3d.test.ui.HUD3DTest$TestHUD.onButtonClicked(HUD3DTest.java:485)
        at org.xith3d.ui.hud.widgets.Button.onMouseButtonReleased(Button.java:686)
        at org.xith3d.ui.hud.HUD.pick(HUD.java:1685)
        at org.xith3d.ui.hud.HUD.onMouseButtonReleased(HUD.java:1735)
        at net.jtank.input.MouseDeviceBase.broadcastButtonPress(MouseDeviceBase.java:237)
        at net.jtank.input.awt.AWTMouse.access$14(AWTMouse.java:1)
        at net.jtank.input.awt.AWTMouse$3.mouseReleased(AWTMouse.java:168)
        at java.awt.Component.processMouseEvent(Component.java:5554)
        at java.awt.Component.processEvent(Component.java:5319)
        at java.awt.Component.dispatchEventImpl(Component.java:4021)
        at java.awt.Component.dispatchEvent(Component.java:3869)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
« Last Edit: 24. February 2007, 02:41:19 pm by Marvin Fröhlich » Logged

Kevin
"It may not seem like a big deal, but ignorance of character encoding issues leads to insidious code rot akin to y2k."
http://stackoverflow.com/users/3474/sylvarking
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 19. February 2007, 03:53:58 pm »

I will check that...

Marvin
« Last Edit: 24. February 2007, 02:41:29 pm by Marvin Fröhlich » Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #2 on: 19. February 2007, 08:22:31 pm »

It's fixed now. It was because of some bugs in the handling of the FallbackTheme.

Please make sure, you have the hud-themes.jar in your classpath, which you can find in resources/ in xith-tk. Or the HUD will look extremely poor. though it doen't crash without it anymore.

Marvin
« Last Edit: 24. February 2007, 02:41:43 pm by Marvin Fröhlich » Logged
horati
Global Moderator
Getting respectable
*****
Offline Offline

Posts: 393


View Profile
« Reply #3 on: 19. February 2007, 09:28:18 pm »

Wow, you are right: it DOES look a lot better with a theme.  I had placed theming as a low priority item so I wasn't worry about the horrible look without any theme.  Thanks.

I'm constructing a scrolling list with this
Code:
        Panel panel = new Panel( 150, 150, true );
        panel.setBackground( new Color4f( 1, 1, 1, 0.5f ) );
        List< Label > list = new List< Label >( 150, 150 );
and it was sized correctly without a theme; however, the items in the list now display to the bottom of the screen even though the scrollbar is working.
« Last Edit: 24. February 2007, 02:42:30 pm by Marvin Fröhlich » Logged

Kevin
"It may not seem like a big deal, but ignorance of character encoding issues leads to insidious code rot akin to y2k."
http://stackoverflow.com/users/3474/sylvarking
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #4 on: 19. February 2007, 09:45:45 pm »

I will check that.

EDIT: fixed and reported here.
« Last Edit: 24. February 2007, 02:44:09 pm by Marvin Fröhlich » Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic