Fullscreen mode and JFileChooser
I have an application that uses fullscreen mode and a JFileChooser. The problem is that whenever the JFileChooser closes it leaves an ugly grey rectangle. Is there any way to avoid this? Maybe if I make the JFileChooser render actively it might work, but I don't know how to do this. Anyone know how?
[308 byte] By [
JTeena] at [2007-9-28 1:11:18]

Well, if I call the render method after the file is saved, then it doen't seem to work. However, if I call render based on keyboard input, then it goes away. I have no idea why this is.
I would also think if the screen is updated due to active rendering, it should go away, but it doesn't. So it's most probably something else. Is it loading or saving a large file? While loading/saving, depending how large the file, it'll pause for a long while leaving an ugly rectangle, but it should go away after loading/saving. So this is not the case? If it is, maybe you could put it in its own thread. I doubt that helps at all, but I think we need more information. Either some code, or other unusual things going on related to this.
Just a thought, but you might try calling repaint() after the JFileChooser closes. If you have paint and update methods that call your render method everything should show up ok, and it might trick swing into getting rid of the grey box.
Or this might not do anything. I'm basically throwing this idea out under the "bang on it 'til it works" theory.
Well usually when you open a FileChooser, it will wait until you select a file before continuing with code. So after the line where you told it to open a file chooser, put repaint(). swing uses the paint method to draw everything, so repaint should redraw everything.