0

hi I have a problem working a project for my school assignment
but I keep getting this error and I have no idea what the problem is.
Can anyone tell me what is wrong with it?

the erroe messeges are

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at SearchGui.showResults(SearchGui.java:46)
at SearchGui.invokeSearch(SearchGui.java:76)
at SearchGui.access$500(SearchGui.java:27)
at SearchGui$1$1.caretUpdate(SearchGui.java:118)
at javax.swing.text.JTextComponent.fireCaretUpdate(JTextComponent.java:367)
at javax.swing.text.JTextComponent$MutableCaretEvent.fire(JTextComponent.java:3232)
at javax.swing.text.JTextComponent$MutableCaretEvent.mouseReleased(JTextComponent.java:3288)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

I also attached the project if anyone wants to take a look

3
Contributors
2
Replies
3
Views
11 Years
Discussion Span
Last Post by hooknc
0

at SearchGui.showResults(SearchGui.java:46)

I'm hoping the SearchGui is a class of yours....

Go to this class, look in your showResults method and then look at line 45 (From the top of the java page...) and there will me an object some where in that line that is null.

Regards,

Nate

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.