2

Possible Duplicate:
Best GUI designer for eclipse?

I have been using NetBeans and just started to try Eclipse. There is no GUI building tools to do component dragging/dropping in Eclipse, right? what do you guys do building GUI with Eclipse? Any one has a good tutorial for Eclipse use? Why do most industry use Eclipse, not NetBeans or JBuilder?

Community
  • 1
  • 1
Justin Woods
  • 137
  • 1
  • 2
  • 4
  • Most folks I know hand-build their GUI's using their own re-usable libraries. – Hovercraft Full Of Eels Sep 23 '11 at 18:06
  • 2
    This question was already discussed [here](http://stackoverflow.com/questions/29426/best-gui-designer-for-eclipse) and [here](http://stackoverflow.com/questions/29426/best-gui-designer-for-eclipse) – jFrenetic Sep 23 '11 at 18:16

4 Answers4

7

Real programmers hand-code their GUI. :-)

Jay
  • 26,140
  • 9
  • 57
  • 109
  • 1
    Actually, I agree with those sentiments. Tools are good ... but you should know the code that gets generated by the tools. And there are some things you might NEED to do that you CAN'T do without hand-coding. At the end of the day, Jay is correct. IMHO... – paulsm4 Sep 23 '11 at 18:06
  • Of course you would know the code. A lot easier to position them with a GUI builder. – Justin Woods Sep 23 '11 at 18:11
  • 1
    Real programmers start with hand-coding their GUI and then move to free/open-source GUI builders :-P (pointing to myself shamelessly) – Usman Saleem Sep 23 '11 at 18:13
  • Real programmers use the tools that allow them to create and maintain code the most quickly. – Andy Thomas Sep 23 '11 at 18:13
  • Well, so they dont need eclipse or netbeans as well:) but instead of compiling same code 10 times to find ideal x,y I think better to use windowbuilder for visual design and time saving, anyway sure you will need to use hand-coding as well when you go with windowbuilder. – HRgiger Sep 23 '11 at 18:17
  • On the serious side: I briefly tried to use a drag-and-drop GUI builder, and I found it to be useless for all but the simplest screens. Maybe better tools are available now. But with a drag-and-drop, how does it know how to position things when the user resizes the window? How does it know what should be a fixed size and what should grow? Etc. In the end I found it much simpler to learn how the layout managers work and to hand-code them. – Jay Sep 23 '11 at 18:21
  • Visual editors support layout managers. And they provide instant feedback as you configure them. – Andy Thomas Sep 23 '11 at 18:31
  • I am SO glad I was forced to start learning java by hand-coding GUI. I don't agree with the whole "Beginners should use Netbeans" idea. You don't know what code is being generated behind the scenes. – David Sep 23 '11 at 19:00
  • 3
    I take it you also write all of your JVM byte code by hand too? That's what *real* programmers do after all. – Flexo Sep 24 '11 at 09:02
  • @Andy: Sure. But they still have to guess what it is you're trying to accomplish. I've often heard it said that you can do a first cut with the drag-and-drop and then hand edit. But the ones I've used generate awful, unnecessarily long and complex code. I just don't see the advantage. – Jay Sep 26 '11 at 13:32
  • @awoodland: The difference is that the mapping from Java source to bytecode should be completely deterministic. That is, for any given line of code, there should be no ambiguity what the generated byte code will do. You cannot say that for a screen layout. If, just to take one simple example, I lay out a row of buttons, what should happen if the user resizes the window? Should the buttons resize? Should the space between them be increased? Should they stay the same size and margins to left and right grown or shrunk? Etc. There's no way for the GUI-builder to know your intent. – Jay Sep 26 '11 at 13:37
  • @Andy: RE using tools that let you develop most quickly: Absolutely. And if your situation is different from mine or the way you work is different or whatever so that GUI-builders work for you, more power to you. I'm not suggesting that they be declared illegal. – Jay Sep 26 '11 at 13:40
  • @Jay, a visual editor does know your intent, without guessing, without ambiguity, even for screen layouts -- because you tell it your intent explicitly. – Andy Thomas Sep 26 '11 at 14:58
  • @Andy: Well, maybe you've used different tools than I have. How does it know how you intend objects to be moved and resized when the user resizes the window? The GUI-builders I've used had no way to say that. – Jay Sep 26 '11 at 17:22
  • @Jay - Selection of an item and use of a properties editor, adjacent visual glyph, menu item or toolbar button. I'm stepping out of this comment thread. – Andy Thomas Sep 27 '11 at 13:13
5

Google's WindowBuilder Pro plugin for Eclipse. http://code.google.com/javadevtools/download-wbpro.html I find it perhaps more powerful that NetBeans' Mattise GUI builder.

Usman Saleem
  • 1,629
  • 9
  • 16
4

Several separate issues here:

  1. Yes, Eclipse has a WSYWIG GUI editor.

    The one problem is that by default, Eclipse uses "SWT". And SWT != Swing. Swing is the standard Java GUI. SWT is non-standard. Any application you code in SWT will need the Java runtime and the appropriate SWT libraries for each different platform you plan on running the application on.

    Not necessarily "bad", but something to be aware of.

    For "beginners", I'd encourage you to use Eclipse, but use Swing instead of SWT.

  2. Eclipse isn't necessarily "better" than NetBeans, JBuilder or other IDE's.

    They're all "good".

    But Eclipse is unquestionably the dominant leader. And there's a huge ecosystem of excellent tools and knowledge about Eclipse out there you can take advantage of.

    And if you want to code Android, Eclipse is probably the IDE you'd be using.

paulsm4
  • 107,438
  • 16
  • 129
  • 179
  • Uh, the toolkit used in the implementation of Eclipse is not the same as the set of toolkits supported in Eclipse visual editors. Swing is used more than SWT, but has no blessing as the One True Standard. And, gee, Swing applications don't require SWT libraries. – Andy Thomas Sep 23 '11 at 18:08
-2

Netbeans is pretty much install and go. When I am making a java application I prefer Netbeans because if your going to make a Java application I doubt it is that important any way; and I say this in regards to Jay's answer. If you were really hardcore cool elite pwnzer l33t you would use vi and definitely not Java. No one wants to program a user interface for fun.. what a joke and a crap answer.