2015-09-06 82 views

回答

2

我只能猜測你的問題應該是什麼意思,但我最好的猜測是你想創建一個模式框架。 JFrame不支持這種類型的幀。您必須改用JDialoghttp://docs.oracle.com/javase/7/docs/api/javax/swing/JDialog.html)。

JDialog dialog = new JDialog(parentFrame , "someTitle" , true); 
... //create dialog 

dialog.setVisible(true); 
//now the parentFrame is blocked until the dialogwindow is closed 
+0

無不是一個對話框,這是一個搖擺框架,一次只能在java菜單項中打開一個如何 –

+0

這是每個定義的對話框。但是我沒有絲毫的線索想要什麼? – Paul