7

My next university project is going to be Java based. We will have to develop this with Swing and I was wondering what's the common preference for that?

A quick glimpse through Netbeans website and I could see a powerful Swing editor, or what it looks like one; since I never used it, I don't know. As for Eclipse, I'm sure there are plugins for Swing, but are they any good? How do they compare to Netbeans?

The bottom line is, should I go with Netbeans or Eclipse for a Swing based project?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
rfgamaral
  • 16,546
  • 57
  • 163
  • 275

6 Answers6

9

I recommend you to use Netbeans -

OscarRyz
  • 196,001
  • 113
  • 385
  • 569
5

I found my own solution which, in my eyes, is the best: I use both!! It's easy. The reasion is: I really appreciate Netbeans' interface editor, but I really prefere Eclipse to work on the code. How it works: use Eclipse and Netbeans a the same time(you need enough ram). In Netbeans I use the interface editor and I never write code. Your application will have a package for the interface and other packages for the loigic, so that you keep the two parts separated. In Eclipse import: swing-worker-1.1.jar and appframework-1.0.3.jar (you can find in Netbeans directories). Then you use a syncronization program (I use Beyond Compare) to import the interface package from Netbeans in the folder of your Eclipse project(use F5 to notify to Eclipse)and to keep it syncornized. In Eclispe you will only fill the handlers of the interface code(written by Netbeans) adding a small piece code that does nothing but to call the logic part of the application that is in the Eclipse only package. This way of proceed is not as complicate as it is seem, and gives to you the best of the two worlds.

chairam
  • 335
  • 5
  • 12
2

If you really want to learn Swing, and especially layouts, then do not use GUI Builders. BorderLayout, BoxLayout, and enough time will build you almost any GUI you want. In this case it does not matter whether you use NetBeans or Eclipse. I personally don't like Eclipse because of the way they do auto-completion. But is's up to you. Plus, professors like to ask you to write code by hand on the exam, so you'd better know how to do that.

Denis Tulskiy
  • 19,012
  • 6
  • 50
  • 68
1

There are a lot of questions like these. You can look around for more.

Building a GUI in Java

Best way to build Java Swing GUI?

Related: Handcode GUI or use gui-designer tool

Community
  • 1
  • 1
Coding District
  • 11,901
  • 4
  • 26
  • 30
0

If you are going to create a rather simple application, I would recommend you handcode it. Learning GridBagLayout is not difficult. And as a university student, this is the best way to go.

If you really want to go for a GUI builder, go with NetBeans. The Eclipse VE project was very good, but is kind of dead. There is also the visualswing4eclipse but it is (IMHO) not even in stable state. Personally I have faced a lot of difficulties in building even a medium complex UI. It sometimes overwrites its own code. Also it uses a own implementation of GroupLayout and not the JDK one.
(I am a hardcore eclipse fan, but eclipse GUI editors - the free ones (I have not tried any non-free ones) are very disappointing.

Nivas
  • 18,126
  • 4
  • 62
  • 76
  • I come from C# and I don't know Java/GUI builders for that platform, but the Visual Studio editor is very good and I never do anything by hand on that platform. – rfgamaral Apr 27 '10 at 10:24
  • I agree in C# you never need to do something by hand. Unfortunately the Java builders are not that advanced. netbeans does a great job, (I have not worked with IntelliJ Idea) but still there is a long way to go. It is still a commin practice to build a swing GUI by hand. – Nivas May 03 '10 at 07:55
0

I recommend NetBeans IDE and it is better as it supports widely and other java related opensource technologies and other tools' plugins are available for Netbeans.

Débora
  • 5,816
  • 28
  • 99
  • 171