Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I find Java desktop application in Netbeans 7.1

I downloaded Netbeans 7.1 with all bundle from http://netbeans.org/downloads and installed it successfully on Windows 7.

But I can't find Java Desktop Application which should be under Java category when add new project as 7.0 does.

Where is it? Or what is the substitute one in 7.1? I need something to create GUI by dragging components.

Thanks.

like image 542
Ovilia Avatar asked Feb 05 '12 04:02

Ovilia


People also ask

Can I create a desktop application in Netbeans?

Note that you can also build and run an application using the options in the Build and Run menus from the IDE's main menu. Compile your application now. Notice the output that displays in the Output window at the bottom of the IDE. Once the build is complete, you can try running the application.


2 Answers

Look here: http://netbeans.org/bugzilla/show_bug.cgi?id=204661

Support for [B]SAF (JSR 296, basically the framework that was behind your "Java Desktop Application" project template) has been abruptly dropped (for no valid reason, let me add).

However, as Bill says in his answer, it is not necessary to use the SAF in order to visually design a form. NetBeans swing-designer (known as Matisse) can be used to design any JFrame, JDialog, JPanel, etc.

You just have to

Right click -> New -> JFrame Form...

and you're ready to drag-and-drop!

(The features you'll be missing are the extra bells and whistles that such framework provided, like SAF Actions, windowing persistence, simplified management for long running Tasks and related visual feedback [now you have to get your hands dirty with the SwingWorker class], etc)

like image 134
Unai Vivi Avatar answered Oct 27 '22 10:10

Unai Vivi


Java Desktop refers to an effort to create a standard or library (libraries) that never really produced anything of significance. I think its likely that they finally removed it from Netbeans.

Its easier to just create a new Java Application project, don't bother with a main, then create a new JFrame Form. That class will have a main for you to use, and you can also design the frame in the form. You can also create JPanel Form classes. Note: you can do this in just about any project in netbeans, there is nothing special about the projects for them.

like image 24
Bill Avatar answered Oct 27 '22 11:10

Bill