全て。jframe を setExtendedState(JFrame.ICONIFIED) で最小化したいのですが、ほとんどの場合は正常に動作しますが、OS(Windows XP) の画面を WIN+L でロックすると動作しない場合があります。私の wimple コードは次のとおりです。
import javax.swing.JDialog;
import javax.swing.JFrame;
public class FrameTest extends JFrame {
public static FrameTest ft = new FrameTest();
public static void main(String[] args)
{
FrameTest.ft.setVisible(true);
FrameTest.ft.setLocation(300, 300);
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
JDialog dlg = new JDialog( ft, "xxx", true );
ft.setExtendedState(JFrame.ICONIFIED);
dlg.setVisible(true);//if not have this line, it works also in screen lock case
}
}
どんな助けでも大歓迎です。