5

I have build an application using the Netbeans Wizard Framework as outlined here and here. I have my application working properly, but the problem I have is that the application does not show in the windows taskbar. I am pretty sure the problem is that the Wizard Framework uses a JDialog instead of a JFrame, but I can't figure out if that can be changed.

If anyone has experience with this framework, please let me know if it can be made to appear in the taskbar.

ewok
  • 20,148
  • 51
  • 149
  • 254
  • Although the tools that generate graphical interfaces can save many lines of code are not always the best option, especially when you need to customize something. I'm not against that these are used, only that have not improved so much in Java. In .NET is another story. – Paul Vargas May 07 '12 at 15:50

2 Answers2

4

Changing is quite easy.

  • Open the form in NetBeans.
  • Change extends javax.swing.JDialog to extends javax.swing.JFrame.
  • Save the file and close it.
  • Reopen the file.
  • In designer mode, make a change. I usually just change the name of a component.
  • Save the file.
  • Undo the change and save the file again.

You should be all set.

Devon_C_Miller
  • 16,248
  • 3
  • 45
  • 71
  • You will probably have to tweak the constructor (the default has the modal boolean for JDialog). You might also want to create a new JFrame form and copy the `public static void main(String[])` method that it uses to launch the JFrame, and then delete your generated class. – BillRobertson42 May 08 '12 at 00:58
  • Define "the form" please. I'm not sure what you're referring to. – ewok May 08 '12 at 03:04
  • NetBeans refers to graphically editable GUIs as "forms" because they consist of a .java file and a .form file which is an xml description of the GUI. When you open a form, you will see a Source/Design toggle in the upper left of the edit window. – Devon_C_Miller May 09 '12 at 10:35
1

Wizard Framework uses a JDialog instead of a JFrame, but I can't figure out if that can be changed.

  • don't use more than one JFrames, this's road to the hell, you cann't to setToFront, setOwner, iconify, etc ...

  • use JDialog or JWindow instead with parent to the one single JFrame

  • use undecorated JDialog, with setModal() or is possible to set various ModalityTypes too

If anyone has experience with this framework, please let me know if it can be made to appear in the taskbar.

  • this Swing Framework is long time depreciated

  • you can use SplashScreen repeatly instead of JDialog/JWindow

mKorbel
  • 109,525
  • 20
  • 134
  • 319