Reputation: 3341
In my GUI, by clicking on the button "Help", I want to open a new window within it containing som text information stored in HTML via JEditorPane
. My question is:
I do not want to make any operations within this window, it will just serve to show the text information.
Upvotes: 0
Views: 1760
Reputation: 14023
The differences between JDialog
and JFrame
are, that JDialog
has no maximize/minimize button, and you can not set a DefaultCloseOperation on it.
Also a JDialog
blocks other components until it is closed (it waits for userinteraction). So if you use it as "Help" window, the user could not leave it open in background and continue working with your application.
If the user can only read your info text, and can not interact with your help, you should use a JFrame
.
A JDialog
should be used if the user has the choice e.g. of pressing Ok
or Cancel
, and he should not be able to do anything before he has choosen something.
Upvotes: 2