jdk1.4 and jbuilder
hi
I am using Jbuilder x 10 and have installed JDK1.4.2 which actually comes with jbuilder. I was given a program from my university lecturer who told me the program works in jdk1.3 and that I have to get it to work with JDK 1.4. here is the problem I am gettting. If anyone can help it would be greatly appreciated because I have been looking at this for 2 days and can get nowhere.
when I run the debug it says:
Hit uncaught exception java.lang.NullPointerException
and it shows the line 114 on eventdespatchthread.java. this can be found in java.awt.eventdispatchthread from the JDK.
synchronized (theQueue) {
theQueue.detachDispatchThread();
/*
* Event dispatch thread dies in case of an uncaught exception.
* A new event dispatch thread for this queue will be started
* only if a new event is posted to it. In case if no more
* events are posted after this thread died all events that
* currently are in the queue will never be dispatched.
*/
/*
* Fix for 4648733. Check both the associated java event
* queue and the PostEventQueue.
*/
if (theQueue.peekEvent() != null ||
!SunToolkit.isPostEventQueueEmpty()) {
theQueue.initDispatchThread();
}
AWTAutoShutdown.getInstance().notifyThreadFree(this);
}
}
}
When I run the program I get this:
java.lang.NullPointerException
at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:50)
at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:736)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2755)
at sun.awt.image.ImageRepresentation.drawToBufImage(ImageRepresentation.java:726)
at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:743)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2755)
at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2745)
at javax.swing.ImageIcon.paintIcon(ImageIcon.java:322)
at javax.swing.plaf.basic.BasicButtonUI.paintIcon(BasicButtonUI.java:306)
at javax.swing.plaf.basic.BasicButtonUI.paint(BasicButtonUI.java:248)
at com.sun.java.swing.plaf.windows.WindowsButtonUI.paint(WindowsButtonUI.java:152)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
at javax.swing.JComponent.paintComponent(JComponent.java:541)
at javax.swing.JComponent.paint(JComponent.java:808)
at javax.swing.JComponent.paintChildren(JComponent.java:647)
at javax.swing.JComponent.paint(JComponent.java:817)
at javax.swing.JComponent.paintChildren(JComponent.java:647)
at javax.swing.JComponent.paint(JComponent.java:817)
at javax.swing.JComponent.paintChildren(JComponent.java:647)
at javax.swing.JComponent.paint(JComponent.java:817)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:557)
at javax.swing.JComponent.paintChildren(JComponent.java:647)
at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4802)
at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4748)
at javax.swing.JComponent.paint(JComponent.java:798)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
at java.awt.Container.paint(Container.java:1312)
at sun.awt.RepaintArea.paint(RepaintArea.java:177)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:260)
at java.awt.Component.dispatchEventImpl(Component.java:3678)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
I know this is a lot to take in and I probably haven't posted half the information you guys might need to help me but If you can it would be brilliant.
thanks

