Cloudgarden's Discussion Board
Forums: Search: Several forums are available for people to post questions/comments about Java Speech or any of the CloudGarden products. As more messages are posted this discussion board should provide a useful, searchable, support database.
o AliceTalker (42)
o JSAPI Projects (69)
o Java Speech API (857)
o Jigloo GUI Builder for Eclipse (3322)
o SwingScroller (0)
o US Election 2004 (3)
Searches text and subject fields in all forums. The search matches as many words as possible. Don't use "AND" or "OR".
Latest "Jigloo GUI Builder for Eclipse" Topics [ Start new "Jigloo GUI Builder for Eclipse" Topic  ]

Enter name (no spaces) and text (< 2000 chars).
Name:
Watch thread: (an email will be sent to you when a reply is posted to this thread)
Email (if watching thread): (will not be made public, or shared with anyone)
Save name & email: (will store info in a cookie)
Subject: Re: Switching to GridbagLayout produces error

To prevent spamming, please type this code "gulujn" in the box.
Text:

Replying to:
Switching to GridbagLayout produces error
Author: Viktor Zacek
07/16/09 01:45
Greetings!

1. create new "Swing Main Application" or "JDialog"

2. switch to tab "Layout", drag GridbagLayout to Form.

3. errors occur... line "GridBagLayout thisLayout = new GridBagLayout();" is misplaced, it should be before first access to "thisLayout".

Code in initGUI is:
     thisLayout.rowWeights = new double[] {0.1, 0.1, 0.1, 0.1};
     thisLayout.rowHeights = new int[] {7, 7, 7, 7};
     thisLayout.columnWeights = new double[] {0.1, 0.1, 0.1, 0.1};
     GridBagLayout thisLayout = new GridBagLayout();
     thisLayout.columnWidths = new int[] {7, 7, 7, 7};
     getContentPane().setLayout(thisLayout);

This error does not occur when creating any other option like JPanel or JFrame.


Best regards,
Viktor