Problem with Applet Security
Hey folks, i have just completed my first java aplet game based on the old arkanoid 'not again',lol, anyways the game runs fine on my laptop which has ME and the 1.4 sdk/jdk blah blah blah installed yet when i run it on my desktop it wont start and if it does runs VERY slow, my desktop is a 1.4gig and my laptop is a p2 366, im doing this as part of second year at uni and am quite new to java, anyways here is the error from the debugger.
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
VM Started: java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
and im getting a null pointer exception when the paint method is trying to paint the graphics, anyone spot whats wrong without me posting the whole code,lol,any help would be great thanks
Just my thoughts (though I could be wrong):
You must have created an image for buffering - when you call the getGraphicsContext() method to get the Graphics object for background painting then it is returned as "null" and hence the error you are getting.
Check if the image you are creating for buffering is created in same context as the getGraphics() method call?
Just a wild shot - hope it works for you!
just a shot (due to past experiences), how are you displaying the image.......
is it through a ImageIcon.paintIcon() method, or a Graphics.drawImage() method....
i have encountered the same exception while trying to use the ImageIcon.paintIcon() method in an applet, but am yet to find out what's wrong.
sorry, more of a question than an answer.
What is that, something to eat?
"All things being equal, the simplest solution tends to be the best."
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL