Dragging windows on top causes GUI to having painting problem
Hi, I've created a video player using Swing. I experience a problem with icons disappearing on my player when I drag another window (such as: Outlook, IE, or anything else) on top of it.
However, if I resize my video player after this happens the icons reappear. I have a listener in my code for when someone resizes the GUI calls repaint().
I don't even know how I would notify my GUI that something is over top of it. Would this be done through something related to focus? Any help is appreciated.
[521 byte] By [
wpr101a] at [2007-11-27 4:28:24]

# 1
hey,
try using a WindowListener()...
//methods to implement
public void windowActivated(WindowEvent e) {}
public void windowClosed(WindowEvent e) {}
public void windowClosing(WindowEvent e) {}
public void windowDeactivated(WindowEvent e) {}
public void windowDeiconified(WindowEvent e) {}
public void windowIconified(WindowEvent e) {}
public void windowOpened(WindowEvent e) {}
hope that helps :)
# 2
Who knows what you are doing wrong. The example from the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html]How to Use Icons[/url] doesn't have this problem. There is nothing special you have to do, the GUI should repaint itself automatically when it get reactivated.
# 3
It appears that my problem might be related to a JOGL renderer. The video player I've created is able to play 4 videos at once. If I do not have any videos loaded at startup the problem does not occur with disappearing buttons. However, when multiple vidoes are loaded and I drag something over then the problem occurs.