GroupLayout rendering problem

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

GroupLayout rendering problem

Postby Baileys » Wed Apr 23, 2008 12:43 pm

Hello,

here is a sample frame that demonstrates the problem I have with the GroupLayout layout.
First, run the Frame and see that the dialog displays correctly.
Then, open it with Swing Designer : it looks corrupted.
Furthermore, when you click on the 'Preview' button, changes are made to the code. Why?
Thanks if you can help me on this one.
Swing Designer version date : 07-04-2008
In the example : KeyValueComboBox must be replaced with JComboBox - it's exactly the same.
Attachments
MyFrame3.zip
(2.92 KiB) Downloaded 128 times
Baileys
 
Posts: 22
Joined: Thu Oct 20, 2005 6:18 am
Location: Montreal

Re: GroupLayout rendering problem

Postby Baileys » Thu Apr 24, 2008 10:20 am

Hello,

did you have a chance to look at this one?
In the meantime, I downloaded the latest build (april 24), rendering is still not ok, but 'Quick preview' does not modify the code any more.
Baileys
 
Posts: 22
Joined: Thu Oct 20, 2005 6:18 am
Location: Montreal

Re: GroupLayout rendering problem

Postby Eric Clayberg » Thu Apr 24, 2008 6:44 pm

What do you mean by looks corrupted?

Which look and feel are you using?

How was the code for your example created? Using Designer, another tool or by hand?

We did modify the Test/Preview function so that it would not regenerate the code.
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: GroupLayout rendering problem

Postby Baileys » Fri Apr 25, 2008 5:52 am

Hi,
I attached screen captures that demonstrates my point.
The code was 100% done with Swing Designer.
Attachments
QuickPreview_NotOK.jpg
Quick Preview : same as in Swing Designer window : problem.
QuickPreview_NotOK.jpg (23.51 KiB) Viewed 1364 times
SwingDesigner_NotOK.jpg
In the Swing Designer window, some TextFields don't have the right size, and the anchors (alignment) are not the good ones.
SwingDesigner_NotOK.jpg (20.21 KiB) Viewed 1359 times
JavaApp_OK.jpg
When Run as a Java App, the Framw looks fine.
JavaApp_OK.jpg (23.68 KiB) Viewed 1365 times
Baileys
 
Posts: 22
Joined: Thu Oct 20, 2005 6:18 am
Location: Montreal

Re: GroupLayout rendering problem

Postby Eric Clayberg » Fri Apr 25, 2008 3:24 pm

Revised example f
Baileys wrote:I attached screen captures that demonstrates my point.
The code was 100% done with Swing Designer.

Give this a try in the latest build. We traced the problem to some Sun GL code and added a work around that should work for your case.

I have also attached a modified version of your class that will work in either the old build or new build.
Attachments
MyFrame3.zip
Revised example file that should display fine in design view and at runtime.
(2.83 KiB) Downloaded 76 times
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: GroupLayout rendering problem

Postby Baileys » Mon Apr 28, 2008 7:43 am

Hello,

thank you for taking the time to look at my case.
I've downloaded the latest build today (20080428). The textfields that were almost invisible are now more visible, but still, their size is not correct. But that is not the most problematic thing.
What causes me more trouble is the 'anchor' problem : when you run the frame 'as is', and you resize the window, you can see that no component move or is resized. They are all left anchored. But in Swing Designer, the anchors are completely reset, and if I do any minor change and save, I lose all previous anchors.
Baileys
 
Posts: 22
Joined: Thu Oct 20, 2005 6:18 am
Location: Montreal

Re: GroupLayout rendering problem

Postby Eric Clayberg » Wed Apr 30, 2008 12:22 pm

Give this a try with the latest build from today.
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: GroupLayout rendering problem

Postby Baileys » Fri May 02, 2008 6:07 am

Eric Clayberg wrote:Give this a try with the latest build from today.


Thank you so much for having worked on my case so quickly. I'm not sure it was an easy one ;)
It's much more stable now.
Still, for some of my dialogs, the 'problem' is there, but when i re-arrange the anchors, the problem never comes back.
So, even if there is still a slight problem with existing windows, it looks like there is no more problem with newly created ones.
I'll tell you more about it in the future...
Thanks again.
Baileys
 
Posts: 22
Joined: Thu Oct 20, 2005 6:18 am
Location: Montreal

Re: GroupLayout rendering problem

Postby Eric Clayberg » Fri May 02, 2008 11:51 am

We found and worked around some bugs in Sun's GL code that was performing some strange optimizations.

That should improve things quite a bit with new code, but there may still be some issues with older generated code until it is regenerated.
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