Thursday, December 23, 2010

What Is Pid In Runescape

When using JFrame and JDialog when

In a java application with windows should be a single JFrame, for the main application window. The other child windows should be JDialog. Of course, we can use JInternalFrame if we want without any problem, but in this article we refer only to windows "real", to which the operating system treats them as such.

Why is this?

a JFrame in a window that Windows creates, in the toolbar, where the menu "start" and the applications you have open a new application button open. In a normal aplcación is that there is only one button. If we create several JFrame in our application, several buttons appear, one for each JFrame.

The JDialog does not display this button. Therefore, the rest of the windows of our application should be JDialog.

There is another reason. A JFrame does not support any other window as a parent. The JDialog does support as parents a JFrame or JDialog. This is important because a child window will always be above its parent window. If we create the JFrame JDialog them as a parent, the JDialog will always be visible above the JFrame. There may be "behind" him.

If further in the JDialog constructor set it to true the flag indicating that it is modal, in addition to passing a parent window, then the JDialog prevent access to other windows until you close.

0 comments:

Post a Comment