IDE better than NETbeans for gui component positioning ?

J

Jole

Hi
I've been using Netbeans to create a gui program. I'm finding that it's
taking longer than it should to position my components and panels etc in my
user interface. I'm starting to think that this ide could be alot better.
Does anyone know of any other free IDE that's good for rapid gui java swing
development, and that works alot better. This iDE doesn't allow you to
specify the exact position of a component, not unless you use Null/absolute
layout. Even though you can use absolute layout and then convert to
gridbag, it's still not as straightforward. Maybe there is a better IDE
out there for this kind of stuff?

thanks
 
D

Dave Monroe

Jole said:
Hi
I've been using Netbeans to create a gui program. I'm finding that it's
taking longer than it should to position my components and panels etc in my
user interface. I'm starting to think that this ide could be alot better.
Does anyone know of any other free IDE that's good for rapid gui java swing
development, and that works alot better. This iDE doesn't allow you to
specify the exact position of a component, not unless you use Null/absolute
layout. Even though you can use absolute layout and then convert to
gridbag, it's still not as straightforward. Maybe there is a better IDE
out there for this kind of stuff?

thanks

Try using a null layout. The canned layouts are more of a problem than a solution.
 
M

Michael Borgwardt

And with good reason! You *can't* specify the exact position of the components
and at the same time deal with variable label contents, font types and sizes.
That's why *Java* discourages it (the IDE has nothing to do with it) and uses
layout managers instead. Once you get used to them, they're very powerful.
Take a look at this tutorial:
http://java.sun.com/developer/onlineTraining/GUI/AWTLayoutMgr/shortcourse.html
Try using a null layout. The canned layouts are more of a problem than a solution.


Exactly the oppsite! Null layouts /"Exact positioning" is amateurish garbage.
 
T

Thomas Weidenfeller

Dave said:
Try using a null layout. The canned layouts are more of a problem than a solution.

Sure, if you like to write bad GUIs, use a null layout manager.

/Thomas
 
R

Roedy Green

Sure, if you like to write bad GUIs, use a null layout manager.

The app is then frozen in size. You can drag it to a bigger frame.

Ideally I'd like apps that could be scaled so the fonts would grow
bigger as well if you wanted.
 
L

Larry Barowski

Roedy Green said:
...

Ideally I'd like apps that could be scaled so the fonts would grow
bigger as well if you wanted.

jGRASP has a global font scale setting. It's not tied to the window
size though.
 
E

Elisabeth Schmitz

Jole said:
Hi
I've been using Netbeans to create a gui program. I'm finding that it's
taking longer than it should to position my components and panels etc in my
user interface.

I agree. I am currently writing a Java GUI and I initially thought
NetBeans forms were the answer. But to be honest clicking my front-end
together with NetBeans' graphic representation of GridBagLayout was
more tedious than well thought-out hand-written code.

I have created some custom panels with the layout manager
pre-configured and add(component,...) overridden. And in the
application I just need to add my components, nothing more. That is
easily done by hand.

And the layout of the application can be easily and centrally amended.

The beauty of Swing is that you don't have to calculate any positions.
If you change a text label it assumes the right size. If you want to
localize the application you just change your ResourceBundles. Done.

Compared to this flexibility absolute positioning is just primitive.

The following table oriented layout managers make life a lot easier
whilst offering a powerful alternative to GridBagLayout:

HIGLayout: http://www.autel.cz/dmi/tutorial.html
TableLayout: http://www.clearthought.info/software/TableLayout/

Regards,
Tarlika Elisabeth Schmitz
 
K

Karsten Lentzsch

Elisabeth said:
The following table oriented layout managers make life a lot easier
whilst offering a powerful alternative to GridBagLayout:

HIGLayout: http://www.autel.cz/dmi/tutorial.html
TableLayout: http://www.clearthought.info/software/TableLayout/

+1

I've found in my layout courses that developers could design
significantly better and quicker with TableLayout then with GBL.
I personally used HIGLayout instead of TableLayout
for quite a while because it provides more features.

The difference seems to be that TableLayout, HIGLayout,
and now FormLayout allow to define the grid first and
then add in a second step the components to the container.
So, there's a constant cost to build a mental layout
from the source code of such a layout manager.

In contrast building a mental layout from a GridBagLayout
or SpringLayout code can be *much* harder. In GBL you
have to read all component constraints to understand
how much columns the finished layout will show.
Basically you have to transform states as does the GBL.
A similar problem applies to the SpringLayout.
To address this issue one can use a visual builder.

I've written a whitepaper that goes more into details
and the "Layout and Panel Building" presentation too:
http://www.jgoodies.com/articles/

The free and open JGoodies FormLayout is the result
of my findings. It supercedes TableLayout and HIGLayout
and comes with additional helper classes that are
intended to make layout production even faster.
See http://forms.dev.java.net

The JGoodies Forms Demo shows everyday layout tasks
that you cannot do with GridBagLayout, TableLayout,
and it shows even some tasks you can't implement with
the powerful HIGLayout.

Just for completeness: Alex Prayle's ExplicitLayout
is a powerful and usable layout manager too. Unlike
the grid oriented layout managers mentioned above,
ExplicitLayout support curved layouts too.

Hope this helps. Best regards,
Karsten Lentzsch
 

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

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top