Hallo zusammen,
ich habe mir eine GUI in Netbeans zusammen geklickt und dann das ganze ins Eclipse verfrachtet, nun habe ich alle nötigen libraries hinzugefügt di ich benötige.
Aber ich habe immer noch einen NullPointerException und komm da nicht weiter.
Hab im Internet schon viel gelesen und ausprobiert aber komm immer noch nicht weiter,
hoffentlich kann imr jemad von euch helfen?
hier den Fehler in der Console:
at GUI.GUIView.<init>(GUIView.java:37)
at GUI.GUIApp.startup(GUIApp.java:20)
ich habe mir eine GUI in Netbeans zusammen geklickt und dann das ganze ins Eclipse verfrachtet, nun habe ich alle nötigen libraries hinzugefügt di ich benötige.
Aber ich habe immer noch einen NullPointerException und komm da nicht weiter.
Hab im Internet schon viel gelesen und ausprobiert aber komm immer noch nicht weiter,
hoffentlich kann imr jemad von euch helfen?
hier den Fehler in der Console:
Java:
31.05.2010 10:46:13 org.jdesktop.application.Application$1 run
SCHWERWIEGEND: Application class GUI.GUIApp failed to launch
java.lang.NullPointerException
at GUI.GUIView.<init>(GUIView.java:37)
at GUI.GUIApp.startup(GUIApp.java:20)
at org.jdesktop.application.Application$1.run(Application.java:171)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.Error: Application class GUI.GUIApp failed to launch
at org.jdesktop.application.Application$1.run(Application.java:177)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at GUI.GUIView.<init>(GUIView.java:37)
at GUI.GUIApp.startup(GUIApp.java:20)
at org.jdesktop.application.Application$1.run(Application.java:171)
... 8 more
at GUI.GUIView.<init>(GUIView.java:37)
Java:
// status bar initialization - message timeout, idle icon and busy animation, etc
ResourceMap resourceMap = getResourceMap();
[COLOR="Red"]int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");[/COLOR]
messageTimer = new Timer(messageTimeout, new ActionListener() {
public void actionPerformed(ActionEvent e) {
statusMessageLabel.setText("Waage-Test");
}
});
messageTimer.setRepeats(false);
int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
for (int i = 0; i < busyIcons.length; i++) {
busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
}
busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {
public void actionPerformed(ActionEvent e) {
busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
}
});
idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
statusAnimationLabel.setIcon(idleIcon);
progressBar.setVisible(false);
at GUI.GUIApp.startup(GUIApp.java:20)
Java:
@Override protected void startup(){
[COLOR="Red"]show (new GUIView(this));[/COLOR]
}
Zuletzt bearbeitet: