Using iSeries Java beans in the Visual Editor

The Visual Editor is a graphical tool for building graphical user interfaces. You can add the iSeries library to your Java projects and use the beans in the Visual Editor.

The Visual Editor has three sections:

The Visual Editor helps you build applications using a set of Java beans that are included in the palette. These include the common AWT and Swing JavaBeans, such as frames, text boxes, and lists. The iSeries beans are in a library that you can add to your project.

A Java Beans view and a Properties view also support your visual class. You can see a tree view of your beans in the Java Beans view, and you can see and edit properties of the beans in the Properties view. You can work directly with any one of the editable views -- Source, Design, or Properties. Any change that you make in one view automatically updates the other views.

To use the iSeries Java beans in the Visual Editor,

  1. Create a Java project containing the iSeries library:
    1. In the main menu, select File > New > Project > Java Project. Click Next.
    2. Give your project a name and click Next.
    3. Click the Libraries tab, and select Add Library.
    4. Select iSeries Utilities and Toolbox and click Next and then Finish.
    5. In the New Java Project dialog, click Finish. A new project is created containing the iSeries Utilities and Toolbox library. The library contains the four JAR files:
      • jt400.jar
      • jt400Servlet.jar
      • iseriesut.jar
      • iseriescomm.jar
  2. Now create a new Java visual class as described in the related task below. The class automatically opens in the Visual Editor. In the Palette view you should see the iSeries Utilities and iSeries Toolbox categories. The JavaBeans view and the Properties view are also added to your perspective.
  3. Customize the main method to instantiate your new class and run the Swing code. Edit the source in the Source view.
  4. Add beans to the canvas by expanding the iSeries drawers in the Palette, clicking on a bean, and then clicking on the canvas to place the bean. As you do so, code is generated in the Source view. Tip: Handle exceptions by selecting generated code, right-clicking and selecting Source >  Surround with try/catch block.
  5. Update the properties of a bean by selecting it and then editing the Properties view.
  6. Add an action listener to a component by right-clicking on it and selecting Events > actionPerformed. A TODO appears in a comment to show where generated code should be customized.
You can find more information on using the Visual Editor in the related information below.
Related concepts
Sample: Using the Visual Editor in your iSeries Java projects
IBM Toolbox for Java
Related tasks
Creating a new Java visual class
Developing Java classes with the visual editor
Running iSeries Java bean examples
Related reference
JFormatted beans
Data file utility (DFU) beans
Object list beans
Database field list bean
JFormattedTextField bean
JFormattedLabel bean
JFormattedComboBox bean
JFormattedTable bean
JFormattedTableColumn bean
JFormattedTextFieldCellEditor bean
JFormattedComboBoxCellEditor bean
JFormattedLabelCellRenderer bean
FormManager bean
ListManager bean
RecordIOManager bean
EditcodeEditwordFormatter bean