Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

Make GUI in Netbeans or Eclipse

Thread view: 
anders - 01 Aug 2007 10:24 GMT
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
Twisted - 01 Aug 2007 12:03 GMT
> 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.
kaldrenon - 01 Aug 2007 13:57 GMT
> 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
David Segall - 01 Aug 2007 17:33 GMT
>Hi!
>This is not a question about the best, becurse it always depend on
[quoted text clipped - 15 lines]
>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.
Mark Space - 01 Aug 2007 19:00 GMT
> 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.
Lew - 01 Aug 2007 21:03 GMT
>> However, it is unfair to compare the IDEs only on the capabilities of
>> their GUI designers and I have never seen anybody advocate Eclipse
[quoted text clipped - 9 lines]
> 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.

Signature

Lew

RedGrittyBrick - 02 Aug 2007 22:32 GMT
> 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.
Twisted - 03 Aug 2007 12:02 GMT
On Aug 2, 5:32 pm, RedGrittyBrick <RedGrittyBr...@SpamWeary.foo>
wrote:
> > So my question is are YOU using Eclipse
>
[quoted text clipped - 3 lines]
>
> Manifold.

Sorry. All your clavicle are belong to us. - Way Mgt.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.