Build Wizards Quickly Using a Swing-Based Wizard Framework
- By Chang Sau Sheong
- April 24, 2001
Component Java
Build Wizards Quickly Using a Swing-Based Wizard Framework
Chang Sau Sheong
Listing 9. "Next" action calls the default behavior.
. . .
public void customize() {
// show PREVIOUS button
showPreviousButton(true);
. . .
// model for the table layout
model = new ClassTableModel();
table = new JTable(model);
table.setPreferredScrollableViewportSize(new Dimension(500, 70));
table.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
}
});
addButton = new JButton("Add");
addButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
addAction();
}
});
bottomPane.add(addButton);
. . .
public void nextAction() {
super.nextAction();
putData("variables",model.getData());
}
public void addAction() {
model.addData();
model.fireTableDataChanged();
}
. . .
About the Author
Chang Sau Sheong is vice president of product engineering at elipva Ltd. (formerly known as sstarfire.com). He can be contacted at [email protected].