2013-02-11 96 views
2

當另一個出現時,我可以鎖定JFrame嗎?就像你想要打開新文件一樣,主窗口被鎖定。如何鎖定JFrame?

+4

http://stackoverflow.com/questions/1481405/how-to-make-a-jframe-modal -in-swing-java – BobTheBuilder 2013-02-11 14:46:57

+0

請參閱[使用多個JFrames,好/壞實踐?](http://stackoverflow.com/a/9554657/418556) – 2013-02-12 11:08:08

+0

^總結:不好的練習 – RyanS 2014-12-21 20:14:24

回答

5

使用modal dialogues,阻斷底層JFrame

+0

我試過使用這種模式的東西,但已經不能工作了(嘗試從oracle的鏈接中取出)。 – Michal 2013-02-12 11:32:25