开发者

Java Swing Applet redrawing garbage after mouse event

开发者 https://www.devze.com 2023-03-13 18:00 出处:网络
I\'m having issues with my Java Swing Applet. I recently reformatted my computer and reinstalled Eclipse to continue work on my application but I\'m having an issue when the screen redraws. Up until n

I'm having issues with my Java Swing Applet. I recently reformatted my computer and reinstalled Eclipse to continue work on my application but I'm having an issue when the screen redraws. Up until now the code has worked 100% (No issues) so I'm certain its an issue with my configuration settings.

The Applet will load fine but after any form of event the screen redraws to something like this: http://i.imgur.com/vODrs.png

I'm using Eclipse Helios with pretty much a bare bones installation. Its configured to use jre6 but I have no idea why this occurs.

**Please also note that if I embed the applet in an html file it works fine! I however ne开发者_开发问答ed the applet to run for various debug features I need while working on the AI


Verify that you are constructing the GUI on the event dispatch thread. This is required for Swing applets, too.


Probably because you are missing a super,paintComponent(g) somewhere when you do custom painting.

0

精彩评论

暂无评论...
验证码 换一张
取 消