2011-10-07 14 views
9

ダイアログを作る方法はありますかProgressMonitorモーダル?ProgressMonitorダイアログをモーダルにすることはできますか?

EDIT:

JAVAのAPIでいるProgressMonitorクラスはトップではなく、モーダルであるダイアログをもたらすでしょう。ユーザーは引き続きバックグラウンドGUIにアクセスできます。私は進捗状況を表示するモーダルダイアログを探していて、途中でタスクを停止することもできます。

+0

私のカスタムProgressThreadMonitorはModalです。より具体的に – mKorbel

+0

ProgressThreadMonitorはどこですか? – 5YrsLaterDBA

+0

私のProgressThreadMonitorはhttp://download.oracle.com/javase/tutorial/uiswing/components/dialog.htmlおよびhttp://download.oracle.com/javase/tutorial/uiswing/components/progress.htmlに基づいています。あなた自身のJDialog#setModal(true)で作成することができます。またはJDialog#setModalityType(Dialog.ModalityType.APPLICATION_MODAL); JProgressBarを配置する場合は、これらのルールに基づいて必須であることを確認してください。http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html – mKorbel

答えて

4

How to Use Progress Monitorsで説明したように、Deciding Whether to Use a Progress Bar or a Progress Monitorの場合、多くの要素を考慮する必要があります。実装の詳細としては、ProgressMonitorは「Solaris implementationはまだDialog.setModalをサポートしていない」ため、モードレスです。現実的には、モーダルProgressMonitorは、JProgressBarのちょうどJOptionPaneですが、このようなモーダルな動作を回避する努力をしていただけると幸いです。

関連する問題