Make GUI in Netbeans or Eclipse

A

anders

Hi!
This is not a question about the best, becurse it always depend on
what you like.

But i have used netbeans for a long time when a write javaprogram
basicly becurse
the handling of GUI part i så good.

But on a numbers of company in my area who are looking for developer,
they are useing
Eclipse.

So i have download it, and i cant find out how to design GUI in it,
noting on the menu etc
as i is in netbeans.

So my question is are YOU using Eclipse
1. Way
2. How du YOU develop the GUI part.

// Anders
 
T

Twisted

So my question is are YOU using Eclipse
1. Way
2. How du YOU develop the GUI part.

Well, I usually write a whole bunch of code like

public class MyClass extends JFrame {
public MyClass () {
JButton doItButton = new JButton();
JPanel mainPanel = ...
... new BoxLayout(BoxLayout.LINE) ...
... BorderFactory.get...
pack();
}
}

....

fooFrame = new MyClass();
fooFrame.setVisible(true);

Sun's Swing tutorial at www.java.com is invaluable if you're going to
be hand-hacking the GUI, and you'll eventually find you have enormous
control over the UI, to the point of being able to extend Swing if you
need to with new Borders or LayoutManagers or whatever; no terrible
resizing behavior because of god-awful absolute hardcoded pixel
coordinates*; and yes, even maintainable source code anyone can edit
with any tool(!)...

* I don't know if the GUI builder that comes with NetBeans does
anything this evil, but I do know that an awful lot of visual GUI
design tools do, and that every last one of them produces brittle code
that can't be hand-hacked and still be read by the GUI tool. A well-
designed such tool would be available as an Eclipse plugin, use its
own source file format it can compile into a default-access helper
class of static methods to put in the same package as and call from
your GUI class, and produce UI that uses layouts rather than hard-
coded coordinate values. It would behave like yacc or bison, turning a
source file type of its own into a separate Java source file meant to
be treated as object code, and embed the Java code for your listeners
in both files the way snippets of C code occur in bison source files.
And help generate the anonymous inner class bubblepak for the
listeners. Normally you'd just call methods of your GUI classes or
other methods in your main Java sources from them, and it would let
you supply any expressions that evaluate to listener objects.
 
K

kaldrenon

So my question is are YOU using Eclipse
1. Way
2. How du YOU develop the GUI part.

There are a number of available plugins for Eclipse that have point-
and-click GUI editing (Such as Jigloo http://www.eclipse-plugins.info/eclipse/plugin_details.jsp?id=472
), but for simpler programs the amount of hand-coding is fairly
trivial. You're going to want direct control over the source either
way, though, so make sure that any tool you use for layouts doesn't
close the hood on it.

And to give you a more pointed reference to the tutorial Twisted
mentioned: http://java.sun.com/docs/books/tutorial/uiswing/

HTH,
Andrew
 
D

David Segall

anders said:
Hi!
This is not a question about the best, becurse it always depend on
what you like.

But i have used netbeans for a long time when a write javaprogram
basicly becurse
the handling of GUI part i så good.

But on a numbers of company in my area who are looking for developer,
they are useing
Eclipse.

So i have download it, and i cant find out how to design GUI in it,
noting on the menu etc
as i is in netbeans.

So my question is are YOU using Eclipse
1. Way
2. How du YOU develop the GUI part.
To compare NetBeans and Eclipse for GUI development you need to add
the VEP plugin <http://www.eclipse.org/vep> to Eclipse. This makes
Eclipse almost as capable NetBeans was _before_ the Matisse GUI
development environment was included in NetBeans 5.0.

However, it is unfair to compare the IDEs only on the capabilities of
their GUI designers and I have never seen anybody advocate Eclipse
over NetBeans in that respect.
 
M

Mark Space

David said:
However, it is unfair to compare the IDEs only on the capabilities of
their GUI designers and I have never seen anybody advocate Eclipse
over NetBeans in that respect.

Just curious: anyone ever try to use both NetBeans and Eclipse in the
same project? The code NetBeans generates is just regular Java
("POJO"). Why not use NetBeans for the GUI objects and Eclipse for the
stuff it's good at?

I'd put the GUI in it's own package (some.project.gui) and use NetBeas
just in one subdirectory/package myself. This might even encourage good
encapsulation, rather than having GUI bits scattered everywhere in the
project.
 
L

Lew

Mark said:
Just curious: anyone ever try to use both NetBeans and Eclipse in the
same project? The code NetBeans generates is just regular Java
("POJO"). Why not use NetBeans for the GUI objects and Eclipse for the
stuff it's good at?

I'd put the GUI in it's own package (some.project.gui) and use NetBeas
just in one subdirectory/package myself. This might even encourage good
encapsulation, rather than having GUI bits scattered everywhere in the
project.

I've been on several projects that had some developers using one, some the
other, some a third, all on the same code base.

Good build scripts based on a versioned source-code repository are the key.
 
R

RedGrittyBrick

anders said:
So my question is are YOU using Eclipse
Yes.

1. Way
Manifold.

2. How du YOU develop the GUI part.

By typing code into the editor.

I came to Java from Delphi, so I'm used to using a GUI form-designer but
I don't really miss it when writing Java.

As others have pointed out, there are several GUI forms-designers that
can be plugged into Eclipse.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,150
Latest member
MakersCBDReviews
Top