Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #3128 > unrolled thread

question about layout

Started by"Adam Sandler" <adam.sandler@THRWHITE.remove-dii-this>
First post2011-04-27 15:43 +0000
Last post2011-04-27 15:43 +0000
Articles 4 — 4 participants

Back to article view | Back to comp.lang.java.gui


Contents

  question about layout "Adam Sandler" <adam.sandler@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000
    Re: question about layout "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000
    Re: question about layout "Boris Stumm" <boris.stumm@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000
    Re: question about layout "RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000

#3128 — question about layout

From"Adam Sandler" <adam.sandler@THRWHITE.remove-dii-this>
Date2011-04-27 15:43 +0000
Subjectquestion about layout
Message-ID<b1cab5cd-2389-48a9-bd0d-3f7f7ae0618c@c23g2000hsa.googlegroups.com>
  To: comp.lang.java.gui
I have a question about Swing development.  I've ran the tutorial for
Eclipse's VE and read http://java.sun.com/docs/books/tutorial/uiswing/layout/visual.html

Now, depending on which layout manager I use, my components (like a
JButton for example) take the size of their container.  When using
gridbag layout with Eclipse VE,I can never explicitly position that
Jbutton.  It gets put at 0,0 or 0,1 for example, but I can never
really control exactly where the component goes.  If the frame gets
resized, then that's a whole other set of issues to solve.

I have seen some really nice Swing UIs out there - buttons that stay
in the same place, keep the same size, and the GUI looks the same
regardless of the size of the frame or form.

How do those developers do it?  How can I produce really professional
looking Swing UIs?  Suggestions are greatly appreciated.

Thanks!

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [next] | [standalone]


#3129

From"Roedy Green" <roedy.green@THRWHITE.remove-dii-this>
Date2011-04-27 15:43 +0000
Message-ID<bs2oq3lvmpm2k4pvqtkcoeijbfhp9be2eo@4ax.com>
In reply to#3128
  To: comp.lang.java.gui
On Thu, 7 Feb 2008 19:43:18 -0800 (PST), Adam Sandler
<corn29@excite.com> wrote, quoted or indirectly quoted someone who
said :

>
>How do those developers do it?  How can I produce really professional
>looking Swing UIs?  Suggestions are greatly appreciated.

See http://mindprod.com/jgloss/layout.html

Jgoodies makes some layouts that give you finer control over the
details.

You can also write your own. 
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#3130

From"Boris Stumm" <boris.stumm@THRWHITE.remove-dii-this>
Date2011-04-27 15:43 +0000
Message-ID<foh519$os9$1@news.uni-kl.de>
In reply to#3128
  To: comp.lang.java.gui
Adam Sandler wrote:

> Now, depending on which layout manager I use, my components (like a
> JButton for example) take the size of their container.  When using
> gridbag layout with Eclipse VE,I can never explicitly position that
> Jbutton.  It gets put at 0,0 or 0,1 for example, but I can never
> really control exactly where the component goes.  If the frame gets
> resized, then that's a whole other set of issues to solve.

GridbagLayout is my worst enemy. I personally like GroupLayout,
although it takes a bit to get used to it.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#3131

From"RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this>
Date2011-04-27 15:43 +0000
Message-ID<47ac1f34$0$13924$fa0fcedb@news.zen.co.uk>
In reply to#3128
  To: comp.lang.java.gui
Adam Sandler wrote:
> I have a question about Swing development.  I've ran the tutorial for
> Eclipse's VE and read http://java.sun.com/docs/books/tutorial/uiswing/layout/visual.html
> 
> Now, depending on which layout manager I use, my components (like a
> JButton for example) take the size of their container.  When using
> gridbag layout with Eclipse VE,I can never explicitly position that
> Jbutton.  It gets put at 0,0 or 0,1 for example, but I can never
> really control exactly where the component goes.  If the frame gets
> resized, then that's a whole other set of issues to solve.
> 
> I have seen some really nice Swing UIs out there - buttons that stay
> in the same place, keep the same size, and the GUI looks the same
> regardless of the size of the frame or form.
> 
> How do those developers do it?  How can I produce really professional
> looking Swing UIs?  Suggestions are greatly appreciated.
> 

The approach I use is ...

1) Don't use VE. Hand code the layouts.
2) Get to understand the various standard layout managers.
3) Nest layouts when appropriate.
4) Consider 3rd-party Layout Managers
    - JGoodies (widely respected.)
    - MigLayout (one I'd strongly recommend.)



Post an ASCII sketch of your desired layout, before and after resizing.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web