Other LayoutManagers are support as well.
Here for instance is an example that uses a GridBag. The use attribute would
make this much shorter but I guess the example was created before we has the
use attr. introduced.
<?xml version="1.0" encoding="UTF-8"?>
<frame name="frame" size="500,300" title="Simple Complaint Dialog"
background="FFCCEE" layout="BorderLayout">
<panel name="pnl" background="3399CC" border="MatteBorder(4,4,4,4,red)"
constraints="BorderLayout.CENTER" layout="GridBagLayout">
<button name="btn1" text="Wonderful">
<gridbagconstraints id="gbc_1"
insets="2,2,2,2"
gridx="0"
gridy="0"
ipadx="15"
ipady="15"
weightx="1"
weighty="1"
/>
</button>
<button name="btn2" text="World">
<gridbagconstraints use="gbc_1"
gridx="1"
/>
</button>
<button name="btn3" text="of">
<gridbagconstraints
insets="2,2,2,2"
gridx="0"
gridy="1"
ipadx="0"
ipady="0"
weightx="1.0"
weighty="1.0"
/>
</button>
<button name="btn4" text="Swing">
<gridbagconstraints
insets="2,2,2,2"
gridx="1"
gridy="1"
ipadx="0"
ipady="0"
weightx="1.0"
weighty="1.0"
/>
</button>
<!--
<label name ="lbl1" text="Short Description"
border="EmptyBorder(0,0,0,10)">
<gridbagconstraints insets="2,2,2,2" anchor="GridBagConstraints.WEST"
/>
</label>
<textfield name ="txt1" preferredSize="240,20"
border="EmptyBorder(0,0,0,10)">
<gridbagconstraints insets="2,2,2,2" anchor="GridBagConstraints.WEST"
gridx="1" weightx="1" gridwidth="3" />
</textfield>
<label name ="lbl2" text="Description" border="EmptyBorder(0,0,0,10)">
<gridbagconstraints insets="2,2,2,2" anchor="GridBagConstraints.WEST"
gridx="0" gridy="1" weightx="0" />
</label>
<textarea name ="area1" preferredSize="240,20"
border="EmptyBorder(0,0,0,10)">
<gridbagconstraints insets="2,2,2,2" anchor="GridBagConstraints.WEST"
gridx="1" weightx="1" weighty="1" gridwidth="3" gridheight="2"
fill="GridBagConstraints.BOTH"/>
</textarea>
-->
</panel>
</frame>
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, January 28, 2003 2:02 AM
To: [email protected]
Subject: [Forum] How to set layout constraints?
Hi,
Is it so, that currently only supported layouts are the flowlayout and the
borderlayout?
//Jarmo
_______________________________________________
Forum mailing list
[email protected]
http://mars.lunarpages.com/mailman/listinfo/forum_carlsbadcubes.com