Dmitri PISSARENKO http://dapissarenko.com












33 SwiXML descriptors






















Dmitri Pissarenko

office@dapissarenko.com

http://dapissarenko.com






Table of Contents

Sample XML descriptors 4

Example 1 4

What it looks like 4

How it's programmed 4

Example 2 6

What it looks like 6

How it's programmed 6

Example 2 9

What it looks like 9

How it's programmed 10

Example 4 12

What it looks like 12

How it's programmed 13

Example 5 14

What it looks like 14

How it's programmed 15

Example 6 18

What it looks like 18

How it's programmed 18

Example 7 19

What it looks like 19

How it's programmed 19

Example 8 21

What it looks like 21

How it's programmed 21

Example 9 22

What it looks like 22

How it's programmed 22

Example 10 24

What it looks like 24

How it's programmed 25

Example 11 26

What it looks like 26

How it's programmed 27

Example 12 28

What it looks like 28

How it's programmed 29

Example 13 31

What it looks like 31

How it's programmed 32

Example 14 34

What it looks like 34

How it's programmed 34

Example 15 36

What it looks like 36

How it's programmed 37

Example 16 39

What it looks like 39

How it's programmed 40

Example 17 42

What it looks like 42

How it's programmed 43

Example 18 46

What it looks like 46

How it's programmed 47

Example 19 50

What it looks like 50

How it's programmed 50

Example 20 53

What it looks like 53

How it's programmed 53

Example 21 57

What it looks like 57

How it's programmed 57

Example 22 58

What it looks like 58

How it's programmed 58

Example 23 60

What it looks like 60

How it's programmed 61

Example 24 67

What it looks like 67

How it's programmed 67

Example 25 69

What it looks like 69

How it's programmed 69

Example 26 70

What it looks like 70

How it's programmed 70

Example 27 74

What it looks like 74

How it's programmed 74

Example 28 75

What it looks like 75

How it's programmed 75

Example 29 79

What it looks like 79

How it's programmed 79

Example 30 81

What it looks like 81

How it's programmed 81

Example 31 83

What it looks like 83

How it's programmed 83

Example 32 85

What it looks like 85

How it's programmed 85

Example 33 87

What it looks like 87

How it's programmed 87

About the author 88


Sample XML descriptors

Example 1

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Dialog title"

layout="GridBagLayout" resizable="true" modal="true" size="430,400">

<label id="datatabaseFile" text="Database file:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="0" anchor="GridBagConstraints.WEST"/>

</label>

<textfield id="databaseTextField" columns="40"

text=" "

editable="false">

<gridbagconstraints

insets="5,5,5,5" gridx="1" gridy="0"

anchor="GridBagConstraints.WEST"/>

</textfield>

<button id="selectDatabaseFileButton" text="Select database file..."

action="selectDatabaseFileButtonAction">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="1" gridwidth="2"

anchor="GridBagConstraints.WEST"/>

</button>

<scrollpane minimumSize="180,300">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="2" gridwidth="2"

fill="GridBagConstraints.BOTH"

weighty="1.0"

anchor="GridBagConstraints.WEST"/>

<table id="table"/>

</scrollpane>


<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="3"

gridwidth="2" anchor="GridBagConstraints.CENTER"/>

<button id="okButton" action="okButtonAction" text="OK">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" action="cancelButtonAction" text="Cancel">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="0"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>

Example 2

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example02.xml"

layout="GridBagLayout" resizable="true" modal="true">

<label text="Target file:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>


<textfield id="targetFileTextField" enabled="false" columns="40">

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<button id="selectFileButton" action="selectFileButtonAction" text="...">

<gridbagconstraints insets="5,5,5,5"

gridx="2" gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<panel border="TitledBorder(Settings)" layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

gridwidth="3"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

<checkbox id="checkBox1" text="Setting 1">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.EAST"/>

</checkbox>

<checkbox id="checkBox2" text="Setting 2">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.EAST"/>

</checkbox>

<checkbox id="checkBox3" text="Setting 3" selected="true">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="3"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.EAST"/>

</checkbox>

<checkbox id="checkBox4" text="Setting 4" selected="true">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="4"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.EAST"/>

</checkbox>

</panel>

<scrollpane>

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="3"

gridwidth="3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<table id="table"/>

</scrollpane>


<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="4" gridwidth="3"

anchor="GridBagConstraints.CENTER"/>

<button id="okButton" action="okButtonAction" text="OK">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" action="cancelButtonAction" text="Cancel">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="0"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>


Example 2

What it looks like



How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example03.xml"

layout="GridBagLayout" resizable="true" modal="true">

<label text="Text parameter 1 (with combo box):">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>


<combobox id="comboBox" enabled="true" editable="true">

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>


<label text="Text parameter 2:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>


<textfield id="textField1" text="Default value of text parameter 1">

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>


<label text="Text parameter 3:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>


<textfield id="textField2" enabled="true" columns="40" text="Default value of text parameter 2">

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>


<panel border="TitledBorder(Other settings)">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="3"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<vbox>

<checkbox id="checkBox1" text="Boolean setting 1 (recommended)" selected="true"/>

<checkbox id="checkBox2" text="Boolean setting 1"/>

</vbox>

</panel>

<scrollpane>

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="4"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<table id="table"/>

</scrollpane>


<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="5" gridwidth="2"

anchor="GridBagConstraints.CENTER"/>

<button id="okButton" action="okButtonAction" text="OK">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" action="cancelButtonAction" text="Cancel">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="0"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>



Example 4

What it looks like



How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<frame title="Example04.xml" resizable="true" modal="true">

<splitpane orientation="JSplitPane.HORIZONTAL_SPLIT"

dividerLocation="150" dividerSize="10">

<scrollpane id="treeScrollPane">

<tree id="tree" />

</scrollpane>

<panel layout="GridBagLayout">

<label text="Data items:">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0"

fill="GridBagConstraints.BOTH" anchor="GridBagConstraints.WEST" />

</label>


<scrollpane id="tableScrollPane">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="1"

fill="GridBagConstraints.BOTH" anchor="GridBagConstraints.WEST" />

<table id="table" />

</scrollpane>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="2"

gridwidth="3" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER" />

<button id="assignButton" action="assignButtonAction"

text="Assign" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0"

fill="GridBagConstraints.BOTH" anchor="GridBagConstraints.WEST" />

</button>

<button id="cancelButton" action="cancelButtonAction"

text="Close" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="0"

fill="GridBagConstraints.BOTH" anchor="GridBagConstraints.WEST" />

</button>

</panel>

</panel>

</splitpane>

</frame>



Example 5

What it looks like



How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<frame title="Example05.xml" resizable="true"

modal="false"

iconImage="null">

<splitpane orientation="JSplitPane.HORIZONTAL_SPLIT"

dividerLocation="150" dividerSize="10">

<scrollpane id="processTableScrollPane">

<tree id="projectScenarioTree" />

</scrollpane>

<panel layout="GridBagLayout">

<!-- Panel 1 (start) -->

<panel id="assemblyPanel" layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0"

weighty="0.2f" weightx="0.4f" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER" />

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5" gridx="0"

gridy="0" gridheight="3" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER" />

<button text="&lt;"

id="assignAssemblyToStuffSelectedInTree"

action="assignAssemblyToStuffSelectedInTreeAction">

<gridbagconstraints insets="5,5,5,5" gridx="0"

gridy="0" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER" />

</button>

<button text="&gt;"

id="unassignAssemblyFromStuffSelectedInTree"

action="unassignAssemblyFromStuffSelectedInTreeAction">

<gridbagconstraints insets="5,5,5,5" gridx="0"

gridy="1" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER" />

</button>

</panel>

<label text="Panel 1">

<gridbagconstraints insets="5,5,5,5" gridx="1"

gridy="0" gridwidth="2" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER" />

</label>

<scrollpane id="assemblyScrollPane">

<gridbagconstraints insets="5,5,5,5" gridx="1"

gridy="1" gridwidth="2" weighty="0.2f" weightx="0.4f"

fill="GridBagConstraints.BOTH" anchor="GridBagConstraints.WEST" />

<table id="assemblyTable" />

</scrollpane>

<button id="deleteItemButton"

action="deleteItemButtonAction" text="Delete item...">

<gridbagconstraints insets="5,5,5,5" gridx="1"

gridy="2" weightx="0.5" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST" />

</button>

<button id="assignItemButton"

action="assignItemButtonAction" text="Assign item...">

<gridbagconstraints insets="5,5,5,5" gridx="2"

gridy="2" weightx="0.5" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST" />

</button>

</panel>


<!-- Panel 1 (end) -->


<!-- Panel 2 (start) -->


<panel id="processPanel" layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="1"

weighty="0.1f" weightx="0.4f" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST" />

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5" gridx="0"

gridy="0" gridheight="3" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER" />

<button text="&lt;"

id="assignProcessFromStuffSelectedInTree"

action="assignProcessFromStuffSelectedInTreeAction">

<gridbagconstraints insets="5,5,5,5" gridx="0"

gridy="0" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER" />

</button>

<button text="&gt;"

id="unassignProcessFromStuffSelectedInTree"

action="unassignProcessFromStuffSelectedInTreeAction">

<gridbagconstraints insets="5,5,5,5" gridx="0"

gridy="1" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER" />

</button>

</panel>

<label text="Panel 2">

<gridbagconstraints insets="5,5,5,5" gridx="1"

gridy="0" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER" />

</label>

<scrollpane id="processScrollPane">

<gridbagconstraints insets="5,5,5,5" gridx="1"

gridy="1" weighty="0.2f" weightx="0.4f"

fill="GridBagConstraints.BOTH" anchor="GridBagConstraints.WEST" />

<table id="processTable" />

</scrollpane>

<button id="deleteItem2Button" action="deleteItem2ButtonAction" text="Delete item 2...">

<gridbagconstraints insets="5,5,5,5" gridx="1"

gridy="2" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST" />

</button>

</panel>



<!-- Panel 2 (end) -->

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="2"

gridwidth="2" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER" />


<button id="operation1Button"

action="operation1ButtonAction" text="Operation 1..."

insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5" gridx="0"

gridy="0" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST" />

</button>

<button id="operation2Button"

action="operation2ButtonAction" text="Operation 2..."

insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5" gridx="1"

gridy="0" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST" />

</button>

<button id="operation3Button"

action="operation3ButtonAction" text="Operation 3..."

insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5" gridx="2"

gridy="0" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST" />

</button>

<button id="operation4Button"

action="operation4ButtonAction" text="Operation 4..."

insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5" gridx="3"

gridy="0" fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST" />

</button>

</panel>

</panel>

</splitpane>

</frame>



Example 6

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example06.xml" resizable="true" modal="true" layout="GridBagLayout">


<label text="Project:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<combobox id="projectComboBox" text="Project:">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>

<checkbox id="assignToScenarioCheckBox" text="Assign to scenario">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</checkbox>


<label text="Scenario:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<combobox id="scenarioComboBox">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="3"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>


<button id="okButton" action="okButtonAction" text="OK" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" action="cancelButtonAction" text="Cancel" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>

Example 7

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example07.xml" resizable="true" modal="true" layout="GridBagLayout">


<label text="Project:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<combobox id="projectComboBox" text="Project:">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>

<panel layout="GridBagLayout" border="TitledBorder(Scenarios)">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>

<checkbox id="assignToScenarioCheckBox" text="Assign to scenario">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</checkbox>

<label text="Scenario:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<combobox id="scenarioComboBox">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>

</panel>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="3"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>


<button id="okButton" action="okButtonAction" text="OK" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" action="cancelButtonAction" text="Cancel" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>

Example 8

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example08.xml" layout="GridBagLayout" modal="true" resizable="false" size="200, 100">

<checkbox id="propertyValueCheckBox" text="Boolean property">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0" anchor="GridBagConstraints.WEST"/>

</checkbox>


<panel layout="GridBagLayout" >

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="1"/>

<button id="okButton" text="OK" Action="okButtonAction">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0"/>

</button>

<button id="cancelButton" text="Cancel" Action="cancelButtonAction">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="0"/>

</button>

</panel>

</dialog>



Example 9

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example09.xml"

layout="GridBagLayout" resizable="true" modal="true">

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="0"

weightx="0.5"

weighty="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<label text="Available items:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</label>

<scrollpane id="notSelectedScrollPane">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="1"

weightx="1.0"

weighty="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<list id="notSelectedList"/>

</scrollpane>

</panel>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="0"

anchor="GridBagConstraints.CENTER"/>

<button id="selectAllButton" action="selectAllButtonAction" text="&gt;&gt;" toolTipText="Select all">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0"

anchor="GridBagConstraints.CENTER"/>

</button>

<button id="selectButton" action="selectButtonAction" text="&gt;" toolTipText="Select">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="1"

anchor="GridBagConstraints.CENTER"/>

</button>

<button id="deselectButton" action="deselectButtonAction" text="&lt;" toolTipText="De-select">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="2"

anchor="GridBagConstraints.CENTER"/>

</button>

<button id="deselectAllButton" action="deselectAllButtonAction" text="&lt;&lt;" toolTipText="De-select all">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="3"

anchor="GridBagConstraints.CENTER"/>

</button>

</panel>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="2" gridy="0"

weightx="0.5" weighty="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<label text="Selected items:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy= "0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</label>

<scrollpane id="selectedScrollPane">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="1"

weightx="1.0" weighty="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<list id="selectedList"/>

</scrollpane>

</panel>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="1"

gridwidth="3"

anchor="GridBagConstraints.CENTER"/>

<button id="okButton" action="okButtonAction" text="OK">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" action="cancelButtonAction" text="Cancel">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="0"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>



Example 10

What it looks like



How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example10.xml" layout="GridBagLayout" resizable="true" modal="true">

<label text="Select items:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<scrollpane id="scrollPane">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<tree id="tree"/>

</scrollpane>

<button id="nextbutton" action="nextbuttonAction" text="Next &gt;" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="4"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

</dialog>



Example 11

What it looks like


How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example11.xml" layout="GridBagLayout" resizable="true" modal="true">

<label text="Value type:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<combobox id="valueTypeComboBox">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>

<label text="Table:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<scrollpane>

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<table id="table"/>

</scrollpane>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="3"

gridwidth="2"

anchor="GridBagConstraints.CENTER"/>

<button id="closeButton" action="closeButtonAction" text="Close" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>



Example 12

What it looks like




How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example12.xml" resizable="true" modal="true" layout="GridBagLayout">

<scrollpane id="tableScrollPane">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

weighty="0.4"

weightx="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<table id="processTable"/>

</scrollpane>

<label text="Text area 1:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>


<scrollpane HorizontalScrollBarPolicy="JScrollPane.HORIZONTAL_SCROLLBAR_NEVER" VerticalScrollBarPolicy="JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

weighty="0.2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<textarea linewrap="true" rows="7" editable="false">

</textarea>

</scrollpane>


<label text="Text area 2:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>


<scrollpane HorizontalScrollBarPolicy="JScrollPane.HORIZONTAL_SCROLLBAR_NEVER" VerticalScrollBarPolicy="JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="4"

weighty="0.2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<textarea linewrap="true" rows="7" editable="false">

</textarea>

</scrollpane>


<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="5"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>


<button id="deleteButton" action="deleteButtonAction" text="Delete" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" action="cancelButtonAction" text="Cancel" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>



Example 13

What it looks like



How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example13.xml" layout="GridBagLayout" resizable="true" modal="true">

<label text="Text:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield editable="false" columns="100">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

weightx="1.0"

anchor="GridBagConstraints.WEST"/>

</textfield>

<label text="Items:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<scrollpane>

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

gridwidth="2"

weightx="1.0"

weighty="0.9"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<table/>

</scrollpane>

<label text="Hold down Ctrl while clicking on the table rows to select several items.">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="3"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<!-- Assign to project panel (start) -->

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="4"

gridwidth="2"

weightx="1.0"

anchor="GridBagConstraints.WEST"/>

<label text="Combo box 1">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<combobox>

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

weightx="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>

<button id="assignToProjectButton" action="assignToProjectButtonAction" text="Assign" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

<!-- Assign to project panel (end) -->


<!-- Assign to scenario panel (start) -->

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="5"

gridwidth="2"

weightx="1.0"

anchor="GridBagConstraints.WEST"/>

<label text="Combo box 2">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</label>

<combobox id="scenarioComboBox">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

weightx="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>

<button id="assignToScenarioButton" action="assignToScenarioButtonAction" text="Assign" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>


<!-- Assign to scenario panel (end) -->


<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="6"

gridwidth="2"

anchor="GridBagConstraints.SOUTH"/>

<button id="closeButton" action="closeButtonAction" text="Close" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>

Example 14

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example14.xml" resizable="true" modal="true" layout="GridBagLayout">

<label text="Found errors">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>


<scrollpane>

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

weighty="0.33"

weightx="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<list id="errorList"/>

</scrollpane>


<label text="Description of the error">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>


<scrollpane>

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="3"

weightx="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<label id="descriptionLabel"/>

</scrollpane>


<label text="How to solve">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="4"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>


<scrollpane>

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="5"

weightx="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<label id="howToSolveLabel"/>

</scrollpane>


<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="6"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>


<button id="fixErrorButton" action="fixErrorButtonAction" text="Fix this error" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="okButton" action="okButtonAction" text="Try again" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" action="cancelButtonAction" text="Cancel" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>

Example 15

What it looks like



How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example15.xml"

layout="GridBagLayout" resizable="true" modal="true">


<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="0"

weightx="0.9"

weighty="0.2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<scrollpane>

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

gridheight="2"

weightx="1.0"

weighty="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<table id="categoryTable"/>

</scrollpane>

<button id="addCategoryButton" action="addCategoryButtonAction" text="Add...">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

weightx="0.1"

fill="GridBagConstraints.HORIZONTAL"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="deleteCategoryButton" action="deleteCategoryButtonAction" text="Delete...">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="1"

weightx="0.1"

fill="GridBagConstraints.HORIZONTAL"

anchor="GridBagConstraints.NORTH"/>

</button>

</panel>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

weightx="1.0"

weighty="0.2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<scrollpane>

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

gridwidth="2"

weightx="1.0"

weighty="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<table id="equivalenceNumberTable"/>

</scrollpane>

<button text="New item...">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

weightx="0.5"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button text="Delete item...">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="1"

weightx="0.5"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>



Example 16

What it looks like



How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example16.xml" layout="GridBagLayout" resizable="true" modal="true">

<panel layout="GridBagLayout" border="TitledBorder(Items type 1)">

<gridbagconstraints

insets="5,5,5,5"

gridx="0"

gridy="0"

weightx="1.0"

weighty="0.5"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<scrollpane id="damageCategoriesScrollPane">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

weightx="1.0"

weighty="1.0"

gridheight="3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<list id="damageCategoriesList"/>

</scrollpane>

<button id="addButton" action="addButtonAction" text="Add...">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="deleteButton" action="deleteButtonAction" text="Delete...">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="1"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="duplicateButton" action="duplicateButtonAction" text="Clone...">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="2"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

weightx="0.5"

weighty="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<label text="Items type 2:">

<gridbagconstraints

insets="5,5,5,5"

gridx="0"

gridy= "0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</label>

<scrollpane>

<gridbagconstraints

insets="5,5,5,5"

gridx="0"

gridy="1"

weightx="0.5"

weighty="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<list/>

</scrollpane>

<panel layout="GridBagLayout">

<gridbagconstraints

insets="5,5,5,5"

gridx="1"

gridy="0"

gridheight="2"

weightx="0.0"

weighty="0.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<button id="selectAllButton" action="selectAllButtonAction" text="&gt;&gt;" toolTipText="Select all">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0"

anchor="GridBagConstraints.CENTER"/>

</button>

<button id="selectButton" action="selectButtonAction" text="&gt;" toolTipText="Select">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="1"

anchor="GridBagConstraints.CENTER"/>

</button>

<button id="deselectButton" action="deselectButtonAction" text="&lt;" toolTipText="De-select">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="2"

anchor="GridBagConstraints.CENTER"/>

</button>

<button id="deselectAllButton" action="deselectAllButtonAction" text="&lt;&lt;" toolTipText="De-select all">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="3"

anchor="GridBagConstraints.CENTER"/>

</button>

</panel>

<scrollpane>

<gridbagconstraints

insets="5,5,5,5"

gridx="2"

gridy="0"

gridheight="2"

weightx="0.5"

weighty="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<table/>

</scrollpane>

</panel>

</dialog>



Example 17

What it looks like



How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example17.xml" layout="GridBagLayout" resizable="true" modal="true">

<label text="Enter some values.">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<label text="Value 1:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield columns="10" text="1">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>


<label text="Value 2:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<combobox>

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>


<label text="Value 3:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield columns="10" editable="false">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<panel Border="TitledBorder(Value 4)" layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="4"

gridwidth="2"

anchor="GridBagConstraints.WEST"/>

<buttongroup>

<radiobutton id="minimumButton" text="Option 1">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</radiobutton>

<radiobutton id="averageButton" text="Option 2" selected="true">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</radiobutton>

<radiobutton id="maximumButton" text="Option 3">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</radiobutton>

</buttongroup>

</panel>

<panel Border="TitledBorder(Value 5)" layout="GridBagLayout" visible="true">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="5"

gridwidth="2"

anchor="GridBagConstraints.WEST"/>

<buttongroup>

<radiobutton text="Option 1" selected="true">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</radiobutton>

<radiobutton text="Option 2">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</radiobutton>

</buttongroup>

</panel>

<checkbox text="Value 6" selected="true">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="6"

gridwidth="2"

anchor="GridBagConstraints.WEST"/>

</checkbox>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="7"

gridwidth="2"

anchor="GridBagConstraints.CENTER"/>

<button id="okButton" action="okButtonAction" text="OK" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" action="cancelButtonAction" text="Cancel">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button text="Some action...">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>



Example 18

What it looks like



How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example18.xml" layout="GridBagLayout" resizable="true" modal="true">

<label text="Please enter some values.">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<label text="Value 1:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield columns="10" text="1">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>


<label text="Value 2:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<combobox>

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>


<label text="Value 3:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield columns="10" editable="false">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<panel Border="TitledBorder(Value 4)" layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="4"

gridwidth="2"

anchor="GridBagConstraints.WEST"/>

<buttongroup>

<radiobutton text="Value 4/1">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</radiobutton>

<radiobutton text="Value 4/2" selected="true">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</radiobutton>

<radiobutton text="Value 4/3">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</radiobutton>

</buttongroup>

</panel>

<panel Border="TitledBorder(Value 5)" layout="GridBagLayout" visible="true">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="5"

gridwidth="2"

anchor="GridBagConstraints.WEST"/>

<buttongroup>

<radiobutton text="Value 5/1" selected="true">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</radiobutton>

<radiobutton text="Value 5/2">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</radiobutton>

</buttongroup>

</panel>

<panel layout="GridBagLayout">

<gridbagconstraints

insets="5,5,5,5"

gridx="0"

gridy="6"

gridwidth="2"

anchor="GridBagConstraints.CENTER"/>

<checkbox text="Value 6">

<gridbagconstraints

insets="5,5,5,5"

gridx="0"

gridy="0"

anchor="GridBagConstraints.WEST"/>

</checkbox>

<checkbox text="Value 7">

<gridbagconstraints

insets="5,5,5,5"

gridx="0"

gridy="1"

anchor="GridBagConstraints.WEST"/>

</checkbox>

<checkbox text="Value 8">

<gridbagconstraints

insets="5,5,5,5"

gridx="0"

gridy="2"

anchor="GridBagConstraints.WEST"/>

</checkbox>

<scrollpane layout="GridBagLayout">

<gridbagconstraints

insets="5,5,5,5"

gridx="0"

gridy="3"

weighx="1.0"

fill="GridBagConstraints.HORIZONTAL"

anchor="GridBagConstraints.WEST"/>

<table>

<gridbagconstraints

insets="5,5,5,5"

gridx="0"

gridy="0"

weighx="1.0"

weighy="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</table>

</scrollpane>

</panel>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="7"

gridwidth="2"

anchor="GridBagConstraints.CENTER"/>

<button id="okButton" action="okButtonAction" text="OK" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" action="cancelButtonAction" text="Cancel">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button text="Some action...">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>



Example 19

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example19.xml"

layout="GridBagLayout" resizable="false" modal="true">

<!-- Value 1 (start) -->

<label text="Value 1:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield text="" columns="20">

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>


<combobox enabled="true" editable="false">

<gridbagconstraints insets="5,5,5,5"

gridx="2" gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>

<textfield text="" columns="20" editable="false">

<gridbagconstraints insets="5,5,5,5"

gridx="3" gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>


<textfield text="" columns="5" editable="false">

<gridbagconstraints insets="5,5,5,5"

gridx="4" gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<!-- Value 1 (end) -->



<!-- Value 2 (start) -->

<label text="Value 2:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield text="" columns="20">

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>


<combobox enabled="true" editable="false">

<gridbagconstraints insets="5,5,5,5"

gridx="2" gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>

<textfield text="" columns="20" editable="false">

<gridbagconstraints insets="5,5,5,5"

gridx="3" gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>


<textfield text="" columns="5" editable="false">

<gridbagconstraints insets="5,5,5,5"

gridx="4" gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<!-- Value 2 (end) -->


<!-- Value 3 (start) -->

<label text="Value 3:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield text="" columns="20">

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>


<combobox enabled="true" editable="false">

<gridbagconstraints insets="5,5,5,5"

gridx="2" gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>

<textfield text="" columns="20" editable="false">

<gridbagconstraints insets="5,5,5,5"

gridx="3" gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>


<textfield text="" columns="5" editable="false">

<gridbagconstraints insets="5,5,5,5"

gridx="4" gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<!-- Value 3 (end) -->


<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="3" gridwidth="5"

anchor="GridBagConstraints.CENTER"/>

<button id="okButton" action="okButtonAction" text="OK">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0"

anchor="GridBagConstraints.WEST"/>

</button>

<button text="Yet another button...">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="0"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" action="cancelButtonAction" text="Cancel">

<gridbagconstraints insets="5,5,5,5" gridx="2" gridy="0"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>



Example 20

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example20.xml" layout="GridBagLayout" resizable="true" modal="true">

<label text="Source currency:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<combobox id="sourceCurrencyCombobox" name="sourceCurrencyCombobox">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>

<panel border="TitledBorder(Conversion Factor)" layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<label text="1 ">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<label id="sourceCurrencyAbbreviationLabel" text="USD">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<label text=" = ">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>


<textfield id="targetCurrencyAmountTextField" name="targetCurrencyAmountTextField" text="1.3" columns="5">

<gridbagconstraints insets="5,5,5,5"

gridx="3"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<label id="targetCurrencyAbbreviationLabel" text="EUR">

<gridbagconstraints insets="5,5,5,5"

gridx="4"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<label text="Date:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield id="exchangeRateDateTextField" name="exchangeRateDateTextField" text="01.03.2007">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="1"

gridwidth="3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

</panel>

<label text="Comment:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield id="commentTextField" text="" name="commentTextField" columns="50">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<!-- Date (created) label and text field (start) -->

<label text="Date (created):">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield id="dateCreatedTextField" text="04.09.2006" columns="15" name="dateCreatedTextField">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<!-- Date (created) label and text field (end) -->

<!-- Date (modified) label and text field (start) -->

<label text="Date (modified):">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="4"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield id="dateModifiedTextField" text="04.09.2006" columns="15" name="dateModifiedTextField">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="4"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<!-- Date (modified) label and text field (end) -->

<!-- Author label and combobox (start) -->

<label text="Created by:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="5"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<combobox id="authorCombobox" name="authorCombobox">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="5"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>

<!-- Author label and combobox (end) -->


<!-- Editor label and combobox (start) -->

<label text="Edited by:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="6"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<combobox id="editorCombobox" name="editorCombobox">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="6"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>

<!-- Editor label and combobox (end) -->

<!-- Source label and combobox (start) -->

<label text="Data source:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="7"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<!-- Source label and combobox (end) -->


<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="0"

gridheight="8"

anchor="GridBagConstraints.SOUTH"/>

<button id="newButton" action="newButtonAction" text="New" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="deleteButton" action="deleteButtonAction" text="Delete" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="undoButton" action="undoButtonAction" text="Undo" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>


<button id="cancelButton" action="cancelButtonAction" text="Cancel">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>



<button id="okButton" action="okButtonAction" text="OK" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="4"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>



Example 21

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example21.xml"

layout="GridBagLayout" resizable="true" modal="true">

<radiobutton text="Databases in my directory:" selected="true">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="0"

gridwidth = "3"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</radiobutton>


<scrollpane>

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="1"

weightx="1.0"

weighty="1.0"

gridwidth = "3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<list id="fileList"/>

</scrollpane>

<radiobutton id="anotherFile" text="Another file:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="2"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</radiobutton>

<textfield id="fileTextField" columns="20" editable="false">

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="2"

weightx="1.0"

weighty="0.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<button id="selectFileButton" action="selectFileButtonAction" text="...">

<gridbagconstraints insets="5,5,5,5"

gridx="2" gridy="2"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</button>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="3" gridwidth="3"

anchor="GridBagConstraints.CENTER"/>

<button id="okButton" action="okButtonAction" text="OK">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0"

anchor="GridBagConstraints.CENTER"/>

</button>


<button id="cancelButton" action="cancelButtonAction" text="Cancel">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="0"

anchor="GridBagConstraints.CENTER"/>

</button>

</panel>

</dialog>

Example 22

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example22.xml" layout="GridBagLayout" resizable="true" modal="true">

<label text="File:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="0"

weightx="0.0" weighty="0.0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield id="fileTextField" columns="20" editable="false">

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy = "0"

weightx="1.0" weighty="0.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<button id="fileButton" action="fileButtonAction" text="...">

<gridbagconstraints insets="5,5,5,5"

gridx="2" gridy = "0"

weightx="0.0" weighty="0.0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</button>


<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="1" gridwidth="3"

anchor="GridBagConstraints.CENTER"/>

<button id="okButton" action="okButtonAction" text="OK">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0"

anchor="GridBagConstraints.CENTER"/>

</button>


<button id="cancelButton" action="cancelButtonAction" text="Cancel">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="0"

anchor="GridBagConstraints.CENTER"/>

</button>

</panel>

</dialog>



Example 23

What it looks like



How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example23.xml" layout="GridBagLayout" resizable="true" modal="true">

<!-- Panel with label 1 and button 1 (start) -->

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

gridwidth = "2"

weightx = "1.0"

weighty = "0.2"

fill = "GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<label text="Label 1">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</label>

<button text="Button 1">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

anchor="GridBagConstraints.WEST"/>

</button>

<scrollpane>

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

weightx = "1.0"

weighty = "0.8"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</scrollpane>

</panel>

<!-- Panel with label 1 and button 1 (end) -->

<!-- Panel with lists 1, 2 and description (start) -->

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

weightx="1.0"

weighty="0.2"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<label text="List 1">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</label>


<scrollpane layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

weightx="0.3"

weighty="0.9"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</scrollpane>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

gridheight="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<button text="&lt;&lt;">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</button>

<button text="&gt;&gt;">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>


<label text="List 2">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</label>

<scrollpane layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="1"

weightx="0.3"

weighty="0.9"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</scrollpane>

<label text="Description">

<gridbagconstraints insets="5,5,5,5"

gridx="3"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</label>

<scrollpane>

<gridbagconstraints insets="5,5,5,5"

gridx="3"

gridy="1"

weightx="0.3"

weighty="0.9"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</scrollpane>

</panel>

<!-- Panel with lists 1, 2 and description (end) -->

<!-- Panel with lists 3 and 4 (start) -->

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

weightx="1.0"

weighty="0.2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<panel layout="GridBagLayout">

<gridbagconstraints insets="0,0,0,0"

gridx = "0"

gridy = "0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

<label text="List 3">

<gridbagconstraints insets="5,5,5,5"

gridx = "0"

gridy = "0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</label>

</panel>

<panel layout="GridBagLayout">

<gridbagconstraints insets="0,0,0,0"

gridx="0"

gridy="1"

weightx="0.5"

weighty="0.9"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<scrollpane layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

weightx="0.1"

weighty="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</scrollpane>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

gridwidth="2"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

<button text="New...">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</button>

<button text="Delete...">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</button>


</panel>

</panel>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

gridheight="2"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.CENTER"/>

<button text="&lt;&lt;">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</button>

<button text="&gt;&gt;">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

<label text="List 4">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</label>

<scrollpane layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="1"

weightx="0.5"

weighty="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</scrollpane>

</panel>

<!-- Panel with lists 3 and 4 (end) -->

<!-- Panel with lists 5 and 6 (start) -->

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="3"

weightx="1.0"

weighty="0.2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<panel>

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

<label text="List 5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</label>

</panel>


<scrollpane id="jScrollPane6" layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

weightx = "0.5"

weighty = "1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</scrollpane>


<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

gridheight="2"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

<button text="&lt;&lt;">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</button>

<button text="&gt;&gt;">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>


<label text="List 6">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</label>

<scrollpane layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="1"

weightx = "0.5"

weighty = "1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</scrollpane>

</panel>

<!-- Panel with lists 5 and 6 (end) -->

<!-- Button panel (start) -->

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="2"

weightx = "0.0"

weighty = "0.0"

gridheight="2"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.SOUTH"/>

<button id="newButton" text="New" action="newButtonAction">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="duplicateButton" text="Duplicate" enabled="false">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="deleteButton" text="Delete" action="deleteButtonAction">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="undoButton" text="Undo" action="undoButtonAction">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" text="Cancel" action="cancelButtonAction">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="4"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="okButton" text="OK" action="okButtonAction">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="5"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="helpButton" text="Help" action="helpButtonAction">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="6"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

<!-- Button panel (end) -->

</dialog>



Example 24

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example24.xml" resizable="true" modal="true" layout="GridBagLayout">

<label text="First name:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield id="firstNameTextField" columns="20">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>


<label text="Surname:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield id="surnameTextField" columns="20">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>


<button id="okButton" action="okButtonAction" text="OK" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" action="cancelButtonAction" text="Cancel" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>



Example 25

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example25.xml" layout="GridBagLayout" modal="true" resizable="false" size="450, 190">

<label text="Property name:">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0" anchor="GridBagConstraints.WEST"/>

</label>

<textfield id="propertyNameTextField" columns="40">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="0" anchor="GridBagConstraints.WEST"/>

</textfield>

<panel layout="GridBagLayout">

<gridbagconstraints insets="0,0,0,0" gridx="0" gridy="1" gridwidth="2" anchor="GridBagConstraints.WEST"/>

<buttongroup>

<radiobutton id="doublePropertyRadioButton" text="Double property" selected="true">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0" anchor="GridBagConstraints.WEST"/>

</radiobutton>

<radiobutton id="stringPropertyRadioButton" text="String property">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="1" anchor="GridBagConstraints.WEST"/>

</radiobutton>

<radiobutton id="booleanPropertyRadioButton" text="Boolean property">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="2" anchor="GridBagConstraints.WEST"/>

</radiobutton>

</buttongroup>

</panel>

<panel layout="GridBagLayout" >

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="2" gridwidth="2"/>

<button id="okButton" text="OK" Action="okButtonAction">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0"/>

</button>

<button id="cancelButton" text="Cancel" Action="cancelButtonAction">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="0"/>

</button>

</panel>

</dialog>

Example 26

What it looks like






How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example26.xml" layout="GridBagLayout" resizable="true" modal="true">

<tabbedpane>

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

weightx = "1.0"

weighty = "1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>

<panel name="Tab 1" layout="GridBagLayout">

<!-- Panel with value 1, 2, 3 and description (start) -->

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>


<label text="Value 1">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>

</label>

<textfield columns="20">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>

</textfield>

<label text="Value 2">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>

</label>

<combobox>

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>

</combobox>


<label text="Value 3">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>

</label>


<textfield columns="20">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>

</textfield>



<label text="Description">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>

</label>

<scrollpane>

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="4"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>

<textarea columns="20" rows="5"/>

</scrollpane>

</panel>

<!-- Panel with value 1, 2, 3 and description (end) -->


<!-- Some list (start) -->

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

weightx = "1.0"

weighty = "1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>


<label text="Some list">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<scrollpane>

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<list/>

</scrollpane>

</panel>

<!-- Some list (end) -->



<!-- Button panel (start) -->

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="0"

weightx = "0.0"

weighty = "0.0"

gridheight="2"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.SOUTH"/>


<button id="deleteButton" text="Delete" action="deleteButtonAction">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.HORIZONTAL"

anchor="GridBagConstraints.WEST"/>

</button>


<button id="duplicateButton" text="Duplicate" enabled="false">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.HORIZONTAL"

anchor="GridBagConstraints.WEST"/>

</button>


<button id="undoButton" text="Undo" action="undoButtonAction">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

fill="GridBagConstraints.HORIZONTAL"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" text="Cancel" action="cancelButtonAction">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="3"

fill="GridBagConstraints.HORIZONTAL"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="okButton" text="OK" action="okButtonAction">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="4"

fill="GridBagConstraints.HORIZONTAL"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

<!-- Button panel (end) -->

</panel>

<panel name="Tab 2">

<!-- Values 4 and 5 (start) -->

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>


<label text="Value 4">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>

</label>

<combobox>

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>

</combobox>

<label text="Value 5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>

</label>

<combobox>

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>

</combobox>

</panel>

<!-- Values 4 and 5 (end) -->

</panel>

</tabbedpane>

</dialog>



Example 27

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog layout="GridBagLayout" title="Example27.xml" plaf='com.sun.java.swing.plaf.windows.WindowsLookAndFeel' modal="true">

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,10" gridx="0" gridy="0" anchor="GridBagConstraints.WEST"/>

<label id="label" text="Please wait">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0" anchor="GridBagConstraints.WEST"/>

</label>

<progressbar id="progressBar" indeterminate="true">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="1" anchor="GridBagConstraints.WEST"/>

</progressbar>

</panel>

</dialog>



Example 28

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example28.xml" layout="GridBagLayout" resizable="true" modal="true">

<label text="Name:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield text="" columns="50">

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="0"

weightx="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<!-- Creation panel (start) -->

<panel layout="GridBagLayout" border="TitledBorder(Creation)">

<gridbagconstraints

insets="5,5,5,5"

gridx="0"

gridy="1"

gridwidth="2"

weightx="1.0"

anchor="GridBagConstraints.WEST"/>


<label text="Author:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<combobox>

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="0"

weightx="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>

<button text="New author...">

<gridbagconstraints insets="5,5,5,5"

gridx="2" gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<label text="Creation date:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield text="" columns="20">

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="1"

weightx="1.0"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

</panel>

<!-- Creation panel (end) -->


<!-- Editing panel (start) -->

<panel layout="GridBagLayout" border="TitledBorder(Editing)">

<gridbagconstraints

insets="5,5,5,5"

gridx="0"

gridy="2"

gridwidth="2"

weightx="1.0"

anchor="GridBagConstraints.WEST"/>


<label text="Editor:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<combobox>

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="0"

weightx="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>

<button text="New editor...">

<gridbagconstraints insets="5,5,5,5"

gridx="2" gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<label text="Editing date:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield text="" columns="20">

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="1"

weightx="1.0"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

</panel>

<!-- Editing panel (end) -->

<!-- Comment 1 (start) -->

<label id="jLabelGoal" text="Comment 1:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield text="" columns="50">

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="3"

weightx="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<!-- Comment 1 (end) -->


<!-- Comment 2 (start) -->

<label id="jLabelInterestedParty" text="Comment 2:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="4"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield text="" columns="50">

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="4"

weightx="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<!-- Comment 2 (end) -->

<!-- Comment 3 (start) -->

<label id="jLabelReason" text="Comment 3:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="5"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield text="" columns="50">

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="5"

weightx="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<!-- Comment 3 (end) -->

<!-- Comment 4 (start) -->

<label id="jLabelComment" text="Comment 4:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="6"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield text="" columns="50">

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="6"

weightx="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<!-- Comment 4 (end) -->

<!-- Comment 5 (start) -->

<label text="Comment 5:">

<gridbagconstraints insets="5,5,5,5"

gridx="0" gridy="7"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield text="" columns="50">

<gridbagconstraints insets="5,5,5,5"

gridx="1" gridy="7"

weightx="1.0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<!-- Comment 5 (end) -->

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="8"

gridwidth="2"

anchor="GridBagConstraints.CENTER"/>

<button id="okButton" action="okButtonActionPerformed" text="OK">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" action="cancelButtonAction" text="Cancel">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="0"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="helpButton" action="helpButtonAction" text="Help">

<gridbagconstraints insets="5,5,5,5" gridx="2" gridy="0"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>



Example 29

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example29.xml" layout="GridBagLayout" modal="true" resizable="false" size="500,250">

<label text="Value 1:">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0" anchor="GridBagConstraints.WEST"/>

</label>

<combobox editable="false">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="0" anchor="GridBagConstraints.WEST"/>

</combobox>

<label text="Value 2:">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="1" anchor="GridBagConstraints.WEST"/>

</label>

<textfield columns="20">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="1" anchor="GridBagConstraints.WEST"/>

</textfield>

<label text="Value 3:">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="2" anchor="GridBagConstraints.WEST"/>

</label>

<label text="Text text text" id="demandedResourceUnitLabel">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="2" anchor="GridBagConstraints.WEST"/>

</label>

<label text="Value 4:">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="3" anchor="GridBagConstraints.WEST"/>

</label>

<combobox>

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="3" anchor="GridBagConstraints.WEST"/>

</combobox>

<label text="Value 5:">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="4" anchor="GridBagConstraints.WEST"/>

</label>

<textfield columns="20">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="4" anchor="GridBagConstraints.WEST"/>

</textfield>

<label text="Value 6:">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="5" anchor="GridBagConstraints.WEST"/>

</label>

<label text="Text text text" id="referenceResourceUnitLabel">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="5" anchor="GridBagConstraints.WEST"/>

</label>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="6" gridwidth="2" anchor="GridBagConstraints.CENTER"/>

<button id="okButton" action="okButtonAction" text="OK">

<gridbagconstraints insets="5,5,5,5" gridx="0" gridy="0" anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" action="cancelButtonAction" text="Cancel">

<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="0" anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>



Example 30

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example30.xml" resizable="true" modal="true" layout="GridBagLayout">

<label text="Title:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield columns="20">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

gridwidth="2"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</textfield>

<label text="Author:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<combobox columns="20">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="1"

weightx="0.3f"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</combobox>

<button text="New author...">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<label text="Comment:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

gridwidth="3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</label>

<scrollpane HorizontalScrollBarPolicy="JScrollPane.HORIZONTAL_SCROLLBAR_NEVER" VerticalScrollBarPolicy="JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="3"

gridwidth="3"

weighty="0.1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<textarea id="commentTextArea" linewrap="true" rows="7" editable="true"/>

</scrollpane>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="4"

gridwidth="3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.CENTER"/>


<button id="okButton" action="okButtonAction" text="OK" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" action="cancelButtonAction" text="Cancel" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>

Example 31

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example31.xml" layout="GridBagLayout" resizable="true" modal="true">

<label text="Select type:">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</label>

<radiobutton text="Type I">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</radiobutton>

<radiobutton text="Type II" selected="true">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</radiobutton>

<radiobutton text="Type III">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="3"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</radiobutton>

<panel border="TitledBorder(Number of items)" layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="4"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

<label text="How many items?">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</label>

<textfield text="1" columns="3">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.NONE"

anchor="GridBagConstraints.WEST"/>

</textfield>

</panel>

<panel layout="GridBagLayout">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="5"

anchor="GridBagConstraints.SOUTH"/>

<button id="okButton" action="okButAct" text="OK" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button id="cancelButton" action="cancelButAct" text="Cancel" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="1"

gridy="0"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

</panel>

</dialog>



Example 32

What it looks like

How it's programmed

<?xml version="1.0" encoding="UTF-8"?>

<dialog title="Example32.xml" editable="false" layout="GridBagLayout" resizable="true" modal="true">

<scrollpane HorizontalScrollBarPolicy="JScrollPane.HORIZONTAL_SCROLLBAR_NEVER" VerticalScrollBarPolicy="JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="0"

gridwidth="3"

weighty="0.1"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<textarea id="messageTextArea" linewrap="true" rows="7" editable="false">Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

</textarea>

</scrollpane>


<scrollpane>

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="1"

weighty="0.3"

gridwidth="3"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

<textarea id="textualReportTextArea" rows="20" editable="false" linewrap="true"/>

</scrollpane>

<button text="Alternative 1" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="0"

gridy="2"

weightx="0.33"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

<button text="Alternative 2" insets="5,5,5,5">

<gridbagconstraints insets="5,5,5,5"

gridx="2"

gridy="2"

weightx="0.33"

fill="GridBagConstraints.BOTH"

anchor="GridBagConstraints.WEST"/>

</button>

</dialog>



Example 33

What it looks like

How it's programmed

<dialog title="Example33.xml" modal="true" resizable="false" layout="GridBagLayout">

<label>

<gridbagconstraints

insets="5,5,5,5"

gridx="0"

gridy="0"

gridheight="4"

anchor="GridBagConstraints.WEST"/>

Place for an image

</label>

<label id="productNameAndVersionLabel" text="Product name">

<gridbagconstraints

insets="5,5,5,5"

gridx="1"

gridy="0"

anchor="GridBagConstraints.WEST"/>

</label>

<label id="productDescriptionLabel" text="Description">

<gridbagconstraints

insets="5,5,5,5"

gridx="1"

gridy="1"

anchor="GridBagConstraints.WEST"/>

</label>

<label id="copyRightLabel" text="Copyright">

<gridbagconstraints

insets="5,5,5,5"

gridx="1"

gridy="2"

anchor="GridBagConstraints.WEST"/>

</label>

<label id="homePageLabel" text="Homepage">

<gridbagconstraints

insets="5,5,5,5"

gridx="1"

gridy="3"

anchor="GridBagConstraints.WEST"/>

</label>

<label>

<gridbagconstraints

insets="5,5,5,5"

gridx="1"

gridy="4"

anchor="GridBagConstraints.WEST"/>

Authors

</label>

<button id="okButton" text="OK" Action="okButtonAction">

<gridbagconstraints

insets="5,5,5,5"

gridx="0"

gridy="5"

gridwidth="2"/>

</button>

</dialog>

About the author

If you need help with SwiXML or need a creative solution for your IT problems, feel free to contact me, Dmitri Pissarenko via e-mail office (at) dapissarenko.com. You can send me messages in English, German and Russian.

I am a freelance developer, currently living and working in Vienna, Austria.

I hold a Bachelor of Science (Honours) degree in Computer Science. You can find my thesis here.

I regard

as my greatest strengths.

Usually, I work according to the no cure, no pay principle (if I can't solve your problem, I won't charge anything).

I've been working as a developer since 1998 and have experience with such diverse programming languages and technologies as


Revision 160

2/89

Dmitri PISSARENKO http://dapissarenko.com