Ken Webb 2010-06-09T13:54:13Z
You can use Xholon to incrementally design, implement, and run a GUI for your app. If you load the Xholon Chameleon app, you can paste one or more versions of a Swing GUI into the top-level Chameleon node. The following image shows a sequence of successively more complex GUI declarations.
<?xml version="1.0" encoding="UTF-8"?> <JFrame Title="Values"> <JPanel PreferredSize="Dimension,400,250"> <EmptyBorder/> <VBoxLayout/> <JLabel Text="CarbonBathtub:"/> <HBox> <JLabel Text="startYear"/> <JTextField Text="2008"/> </HBox> <HBox> <JLabel Text="endYear"/> <JTextField Text="2070"/> </HBox> <HBox> <JLabel Text="currentYear"/> <JTextField Text="0"/> </HBox> <JLabel Text="Atmosphere:"/> <JLabel Text="InAllHumanMadeCo2:"/> <JLabel Text="OutAbsorbedByPlantsAndSoils:"/> <JLabel Text="OutAbsorbedByOceans:"/> <JLabel Text="OutAbsorbedBySedimentsAndRocks:"/> <HBox> <JButton Text="Save" ActionCommand="saveupdatedvalues"/> <Strut Width="10"></Strut> <JButton Text="Refresh" ActionCommand="refreshvalues"/> </HBox> </JPanel> </JFrame>
This is just a mock-up to show what we want the GUI to look like. Now let's write a script that will generate the GUI dynamically at run time.