override show() like this:
public void show()
{
super
this
}
and then add a window listener for
the focus lost event:
addFocusListener (new java
public void focusLost (java
this
}
}
);
It seems to work for me
/**
* Call this from class consructor
*/
public void initialize() {
TopThread top = new TopThread();
top
}
/**
* Keep JWindow on top (inner class)
*/
class TopThread extends Thread {
public void run() {
while(true) {
toFront();
/**
* Let
*/
try {
Thread
}
catch(Exception e) {
// do what you wanna do
}
}
}
}
You can see:?forum=
That
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19390.html