GroupLayout problem (corrupt source)

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 problem (corrupt source)

Postby mkornatzki » Thu Apr 23, 2009 12:51 am

Hi,

i am testing the grouplayout with swingdesigner 6.9.1 an if i move some components on my jframe sometimes the source gets corrupt.

Here is a code snipped created by the designer:

Code: Select all
   private void initialize() {
      groupLayout.setVerticalGroup(
         groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(groupLayout.createSequentialGroup()
               .addContainerGap()
               .addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                  .addComponent(getLblFindWhat_1())
                  .addComponent(getBtnFindNext())
                  .addComponent(getStringValueField(), GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
               .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
               .addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
                  .addGroup(groupLayout.createSequentialGroup()
                     .addComponent(getCbMatchWholeWord())
                     .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                     .addComponent(getCbMatchCase()))
                  .addGroup(groupLayout.createSequentialGroup()
                     .addComponent(getBtnCancel())
                     .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                     .addGroup(groupLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(getBtnNewJbutton())
                        .addComponent(getPnl(), GroupLayout.PREFERRED_SIZE, 57, Short.MAX_VALUE))
                     .addGap(33, 33, 33)))
               .addContainerGap())
      );
      final GroupLayout groupLayout = new GroupLayout((JComponent) getContentPane());
      groupLayout.setHorizontalGroup(
         groupLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(groupLayout.createSequentialGroup()


The problem is that groupLayout is used before it is instanciated!
This occur not always but often :(

Is this a known problem and gets fixed next time?

regards,
michael
mkornatzki
 
Posts: 121
Joined: Wed Oct 15, 2008 3:57 am

Re: GroupLayout problem (corrupt source)

Postby Eric Clayberg » Tue May 05, 2009 6:00 am

This is a known issue that is being worked on.
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: Google [Bot] and 1 guest