Re: GridBagLayout - How grow my columns correctly?
- From: Andrew Thompson <SeeMySites@xxxxxxxxxxx>
- Date: Mon, 27 Jun 2005 07:22:55 GMT
On 26 Jun 2005 23:39:22 -0700, newgro wrote:
....
> import java.awt.BorderLayout;
> import java.awt.GridBagConstraints;
> import java.awt.GridBagLayout;
....
> import de.coresd.swing.SwingConstants;
What is this non-core class, and why are you using it
in code you post to usenet?
....
> public class TestAddressEditPanel extends JPanel {
>
> /* the labels section*/
Please replace tab characters with 2 or three space
characters when posting to usenet..
.....
> add(lblStreetName, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,
> GridBagConstraints.LINE_END, GridBagConstraints.NONE,
> SwingConstants.INSETS_MIDDLE, 0, 0));
Aha! So ..does
'de.coresd.swing.SwingConstants.INSETS_MIDDLE' *
...translate to..
<http://java.sun.com/j2se/1.5.0/docs/api/java/awt/GridBagConstraints.html#CENTER>
?
If not, what?
If so, why not use GBC.CENTER ?
* As an aside, that is a very unfortunately named class,
given javax.swing.SwingConstants, and that it seems to replicate
constants available in the AWT, ..and imply that they are part
of Swing.
> public static void main(String[] args) {
> JFrame frame = new JFrame("Testadress");
....
> frame.setVisible(true);
> }
}
...and please do not forget to add the closing '}'.
Having a self-contained code sample (no non-core imports,
no lines broken due to wrapping, all braces in place), helps
you to get the real GBL experts into considering the problem.
Though, one of them may glance at the code and spot your mistake.
Who can say.. ;-)
--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
.
- Follow-Ups:
- Re: GridBagLayout - How grow my columns correctly?
- From: newgro
- Re: GridBagLayout - How grow my columns correctly?
- From: Knute Johnson
- Re: GridBagLayout - How grow my columns correctly?
- References:
- GridBagLayout - How grow my columns correctly?
- From: newgro
- GridBagLayout - How grow my columns correctly?
- Prev by Date: GridBagLayout - How grow my columns correctly?
- Next by Date: how add checkbox to tree as a leaf
- Previous by thread: GridBagLayout - How grow my columns correctly?
- Next by thread: Re: GridBagLayout - How grow my columns correctly?
- Index(es):