Huge JPanels not supported??

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

Huge JPanels not supported??

Postby mimmoz81 » Mon Jun 28, 2010 7:09 am

Hello,

I'm trying to design a huge absolute positioning jpanel with gui components inside of it, with WindowBuilder 7.5.0 and Eclipse 3.5.1.

I found that window builder does not display panels bigger than 1685x1028 (or some similar..) in its designer: it enables me to change preferredSize property with a Dimension like 3000x3000 but does not display it correctly.
The result is that if I have some component in coordinates bigger 1685x1028 I cannot see it in designer.


Please help
Thanks
Luca
mimmoz81
 
Posts: 12
Joined: Tue Jun 08, 2010 10:45 pm

Re: Huge JPanels not supported??

Postby Eric Clayberg » Mon Jun 28, 2010 10:12 am

WindowBuilder itself does not impose any such limitations, but most OS / window systems do impose a rendering limit that is the same size as your physical display.

If you use a larger display, you will be able to design a larger panel. Using a virtual display larger than your physical display might also help.

And since I can't imagine any good reason to create a panel that size (or any good reason to use absolute positioning for anything for that matter), I would also encourage you to break your panel down into smaller, more manageable pieces and to use one of the real layout managers.
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

Re: Huge JPanels not supported??

Postby mimmoz81 » Mon Jun 28, 2010 11:11 am

I have to provide a jpanel with a large background jpeg image taken from Autocad that represents an industrial plant. The large size of the background image brings me to absolute layout positioning because I have to put graphical components on top of the background.
Those components never have to move away from the position I give them, because they represents physical positions on the plant.
So I use an absolute jpanel inside a jscrollpane in order to be able to scroll the plant and see what's happening on there..

Is there another way to do this?
How can I use another layout manager if I want the components to be at a specific position?

Luca
mimmoz81
 
Posts: 12
Joined: Tue Jun 08, 2010 10:45 pm

Re: Huge JPanels not supported??

Postby Eric Clayberg » Mon Jun 28, 2010 11:49 am

What you are describing begs for dynamically positioning the components at runtime based on the scale of the background image.

What are you going to do, for example, when the powers-that-be tell you to scale the image or support zooming?

The only way you are going to be able to graphically edit a panel that big is to either break it up into pieces or (possibly) use a virtual display to trick the OS into thinking you have a larger display.
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