Abelli Software
freeware
licence
useful links
donate
payware
 
topleft  
 

screenshot

GuiBuilder (Java) v1.0.Beta2

A simple code generator for graphical user interfaces in Java

Installation:

1. Download GuiBuilder.zip
2. Unpack the contents in any directory ( GuiBuilder.jar, GuiBuilder.bat )
3. Edit GuiBuilder.bat

As I have altered the routine for compilation and execution of the generated java-file, an external library has to be loaded, tools.jar. Where it is can vary between computers and depending on which version of J2SE you have installed. In JDK 1.5.0.01 it will default be located at:

c:\program\java\jdk1.5.0_01\lib\tools.jar

If it exists on this address, you can in most Windows versions execute GuiBuilder just by double clicking on GuiBuilder.jar. If you have another address for tools.jar, the easiest is to edit in GuiBuilder.bat to the right address.

Execution:

1. Double click GuiBuilder.bat

GuiBuilder works like this:

1. Click in the "empty" box

screenshot

2. You'll see the alternatives in the dialogue:

screenshot

3. If you click on any of the layout buttons, a JPanel is created with new empty fields. The JPanel is created with the LayoutManager you've chosen.

screenshot GridLayout (Don't forget to write the number of rows and columns you want befor you click the GridLayout-button)

screenshot BorderLayout

screenshot FlowLayout

Each Layout you create in the form will be marked with a separate colored border, blue for GridLayout, green for BorderLayout, purple for FlowLayout.

screenshot

You also have the possibility to remove the whole panel where the field exists with [Remove Layoutpart]. 

NB! If you remove a panel, all other panels or elements it contains will also be removed.

If you in the example above click on a field within the blue frame and choose [Remove Layoutpart], this GridLayout is removed (4 fields in the example above), but if you e.g. click on a field above the blue frame, the BorderLayout-panel is removed, including the GridLayout- and FlowLayout-panels.

4. When you in the Layout palette click on another item, such an item will be created in the empty field, e.g. JButton:

screenshot

5. Then it's just to continue until you have the layout you drew on paper when planning it :-)

screenshot

screenshot6. If you click on a field where you already have put an element, you'll get a "property"-dialog, where you can change the values for this item:

Which properties you can change, varies between the different items, e.g:

Name = This is the name of the variable referencing the element, as it will turn up in the source code.
Text = If your item can have a visible text, this will be the initial value
ActionCommand = If your item can generate events, this will be its "actionCommand"
Selected = If your item can have a boolean value (e.g. JCheckBox), this is its initial value
ImageFile = The name of the image file to display (e.g. Nisse.gif)
ButtonGroup = The name of the variable for the ButtonGroup a JRadioButton is part of.

You also have the possibility to remove the item from the form with [Delete].

7. When you save the changes with [Save] some changes will show directly in the editor; Name (variable name) and either Text (the text used as initial value) or ImageFile (name of the image file to be used):

screenshot

8. When you click [Generate and Run] you'll get a dialog where you choose what directory to put the files into (You must first fill in the name you want for your JFrame class):

 screenshot

9. When you've marked the directory and click [Save] the source code file will be generated. It will also try to compile and run it:

screenshot

10. Hopefully you'll now see your efforts displayed on the screen:

screenshot

Not much to see, but now you can use your favorite editor to make the last adjustments by yourself...

Version History:

2005-03-10 v1.0.B2 Added possiblity to use "FlowLayout"-panels
2005-03-10 v1.0.B1 Now "Item Properties" is almost to 100% done via reflection, which makes future changes in the elements API's visible without the need to re-compile GuiBuilder.
2004-12-10 v0.9.5 Some "Help classes" are generated, e.g. instead of an anonymous AbstractTableModel, a separate <JTable>TableModel is generated, etc.
2004-12-10 v0.9.4 Further "stubs" added at generation of specific items, e.g. a JComboBox is "preloaded" with alternatives, so you have a stub to work from.
2004-08-23 v0.9.3 "Internal" compilation and execution.
2004-07-20 v0.9.2 All generated elements are now from the javax.swing-library (except java.awt.Canvas, because there is no JCanvas). A pretty big rewrite...
2003-11-16 v0.9.1 bug fixed: when a JTable is chosen, a generated JScrollPane will be in the top layout, instead of the JTable directly, so the scrollbars really shows...
2003-08-10 v0.9.0 First published "release", packed with a jar- and a bat-file for easy execution.
2003-06-06 v0.8 Elaborating with jars, wrote a manifest.mf to start from the jar
2003-05-17 v0.7 Added JTable, with scrollbars (at least I thought I did)
2003-05-10 v0.6 Wrote a new FileDialog
2003-04-09 v0.5 Added the possibility to use Checkboxes as RadioButtons with CheckboxGroups
2003-04-02 v0.4 Added Checkboxes
2003-03-17 v0.3 Added TextAreas, Canvas and possibility to put in images. Added possibility to save the generated file through a FileDialog.
2003-03-10 v0.2 Added panels to make more elaborate layouts, added posiibility to use BorderLayouts
2002-02-23 v0.1 First attempt, generated Buttons, Labels and TextFields in a Frame with a GridLayout

To Do List:

Add the possibility to remake an old design, either through first saving the parameters themselves in a separate file, or to parse any JFrame into GuiBuilder.


Copyright © Björn Abelli, abelli software, 2006

For donations with Payson
www.abelli.se
 
bottomleft