Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Modal/Modeless Dialogs  RSS feed

 
Rolf Moholth
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I achieve the following effect:
From my "tool box" dialog window, I can couble click and start one of several "tools". Several tools will be active at the same time.
Each tool is implemented as a main dialog box. It is possible to launch new dialogs from the main dialog boxes of each tool.
I need to have the dialog boxes of different tool "modeless" with respect to one another, while within a single tool, they should be "modal". The effect being that I cannot have more ONE ACTIVE DIALOG FROM THE SAME TOOL, but I will have ONE ACTIVE DIALOG FROM EACH TOOL. This is a kind of mixture of both modal and modeless. Tried to achieve it with threads, but failed.
If anyone understood my problem: Please, a hint will be greatly appreciated!
 
Idly Vada
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rolf Moholth:

Each tool is implemented as a main dialog box. It is possible to launch new dialogs from the main dialog boxes of each tool.
I need to have the dialog boxes of different tool "modeless" with respect to one another, while within a single tool, they should be "modal". The effect being that I cannot have more ONE ACTIVE DIALOG FROM THE SAME TOOL, but I will have ONE ACTIVE DIALOG FROM EACH TOOL. This is a kind of mixture of both modal and modeless. Tried to achieve it with threads, but failed.

Create two dialog classes namely ToolDialog and InternalToolDialog which extend JDialog.Make InternalToolDialog modal in it's constructor or using setModal(true).
Use ToolDialog for your tools and in tools use InternalToolDialog
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!