Absolute Layout - Autosize widget

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Absolute Layout - Autosize widget

Postby munal » Mon Oct 05, 2009 1:03 am

Hi,

When I add an widget (e.g.JTextfield with columns 3) to a panel which of its layout is flowlayout, My JTextfield preferred size will become w:42, h:24.
When I add the same widget to a panel which of its layout is absolute, and select "autosize widget" from the popup menu; the designer makes bounds as w:45, h:25. When I print out the preferred size, I still get w:42, h:24. Isn't the designer supposed to make bounds as preferred size, when you select "autosize widget". Is there a way of customizing this?

Thanks in advance (Window Builder 6.9.2 with Eclipse 3.4 on XP)
munal
 
Posts: 5
Joined: Thu Oct 01, 2009 2:01 am

Re: Absolute Layout - Autosize widget

Postby Eric Clayberg » Mon Oct 05, 2009 7:42 pm

munal wrote:Isn't the designer supposed to make bounds as preferred size, when you select "autosize widget".

It snaps to whatever grid size you have in effect (presumably 5x5 in your case).

munal wrote:Is there a way of customizing this?

You can either use v7.x or the latest v6.9.x build (and hold down the Shift key when autosizing).
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to Swing Designer

Who is online

Users browsing this forum: No registered users and 1 guest