Sign in to follow this  

Erasing problem with Java's Swing

This topic is 4249 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all, I'm a first year student in computer science. I wanted to extend a bit my knowledge of Java beyond what they're teaching us, and so I started programming using the javax.swing GUI. I'm doing a small game which has a main JFrame and a layered JPanel added on it when starting, but this last one gets erased (it looks more like washed) when another window (not necessarily a Java application window) gets in front of it, when it is dragged out of the screen or when the screen saver is turned on. I solved the first problem by setting setAlwaysOnTop(true), but it still creates a problem when moving the window across the screen... I don't know know what I could do, I asked some of my friends, but being them as the same level as me, there wasn't much they could do. I didn't think asking my teacher would have been a good idea, therefore I'm here asking you... thanks ^^

Share this post


Link to post
Share on other sites
Quote:
Original post by SinTonic
I didn't think asking my teacher would have been a good idea, therefore I'm here asking you... thanks


Answering your questions is what they get paid to do. It's always to your advantage to try to get to know your professors and to have them think that you're an ambitious student willing to go above and beyond. Your professor is also more likely to know the answer than the people on these boards, as most of us make games with DirectX or OpenGL, not javax.swing.

Share this post


Link to post
Share on other sites

This topic is 4249 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this