By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,650 Members | 1,493 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,650 IT Pros & Developers. It's quick & easy.

applet error

P: 59
i am trying to put a java japplet on website. when i run in eclipse it works fine but when i run on website then i get a error:

error: on website


Expand|Select|Wrap|Line Numbers
  1. CacheEntry[http://localhost/eCommerce/menu_pages/game_pages/java_game_3/Main.class]: updateAvailable=true,lastModified=Fri Apr 26 20:39:42 EDT 2013,length=10508
  2. CacheEntry[http://localhost/eCommerce/menu_pages/game_pages/java_game_3/Main$Display.class]: updateAvailable=true,lastModified=Fri Apr 26 20:39:42 EDT 2013,length=2489
  3. Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
  4.     at Main$Display.paintComponent(Main.java:369)
  5.     at javax.swing.JComponent.paint(Unknown Source)
  6.     at javax.swing.JComponent.paintChildren(Unknown Source)
  7.     at javax.swing.JComponent.paint(Unknown Source)
  8.     at javax.swing.JLayeredPane.paint(Unknown Source)
  9.     at javax.swing.JComponent.paintChildren(Unknown Source)
  10.     at javax.swing.JComponent.paintToOffscreen(Unknown Source)
  11.     at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
  12.     at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
  13.     at javax.swing.RepaintManager.paint(Unknown Source)
  14.     at javax.swing.JComponent.paint(Unknown Source)
  15.     at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
  16.     at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
  17.     at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
  18.     at java.awt.Container.paint(Unknown Source)
  19.     at javax.swing.RepaintManager$3.run(Unknown Source)
  20.     at javax.swing.RepaintManager$3.run(Unknown Source)
  21.     at java.security.AccessController.doPrivileged(Native Method)
  22.     at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
  23.     at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
  24.     at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
  25.     at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
  26.     at javax.swing.RepaintManager.access$1000(Unknown Source)
  27.     at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
  28.     at java.awt.event.InvocationEvent.dispatch(Unknown Source)
  29.     at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
  30.     at java.awt.EventQueue.access$200(Unknown Source)
  31.     at java.awt.EventQueue$3.run(Unknown Source)
  32.     at java.awt.EventQueue$3.run(Unknown Source)
  33.     at java.security.AccessController.doPrivileged(Native Method)
  34.     at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
  35.     at java.awt.EventQueue.dispatchEvent(Unknown Source)
  36.     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
  37.     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
  38.     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
  39.     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
  40.     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
  41.     at java.awt.EventDispatchThread.run(Unknown Source)

i am putting japplet but using:

Expand|Select|Wrap|Line Numbers
  1. <applet code = "Main.class" width = "900" height = "400"> </applet>   

Main.java line369
Expand|Select|Wrap|Line Numbers
  1. levelsObject.paint(g, topMenuObject);
  2. ...
  3. topMenuObject.paint(g, levelsObject, lifeStore);
Apr 27 '13 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.