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  ]

Cloudgarden Discussion Board  
This topic has 0 replies.       [ << Previous Topic | Start of Thread | >> Next Topic ]
Switching to GridbagLayout produces error
Author: Viktor Zacek
07/16/09 01:45 Reply
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