} catch (Exception e) {
e.printStackTrace();
}
Control control = new Control(new CallbackTest(), "Configure FTP Servers", null, null, false);
ControlPanel panel = control.getPanel();
ActionRegistry actionRegistry = new ActionRegistry(this);
ButtonBar bar = new ButtonBar();
bar.addConfiguredButton(new Button("Add an FTP server", "addserver", ActionType.OK));
bar.addConfiguredButton(new Button("Remove an FTP server", "removeServer", ActionType.OK));
bar.addToControlPanel(panel);
bar.register(actionRegistry);
Separator sep = new Separator();
sep.addToControlPanel(panel);
BooleanProperty bp = new BooleanProperty();
bp.setLabel("Passive-mode connection:");
bp.setProperty("pasv");
bp.setEditable(true);
// ValueHandle g1 = panel.addBooleanProperty("Passive-mode connection:", "pasv", true, null);
bp.addToControlPanel(panel);
TextProperty tp1 = new TextProperty();
tp1.setLabel("Server address:");
tp1.setProperty("serverAddress");
tp1.setColumns(30);
tp1.setEditable(true);
tp1.setPassword(false);
tp1.setRequired(false);
tp1.addToControlPanel(panel);
// ValueHandle g2 = panel.addTextProperty("Server address:", "serverAddress", 30, true, false, false, null);
TextProperty tp2 = new TextProperty();
tp2.setLabel("Server login:");
tp2.setProperty("login");
tp2.setColumns(30);
tp2.setEditable(true);
tp2.setPassword(false);
tp2.setRequired(false);
tp2.addToControlPanel(panel);
TextProperty tp3 = new TextProperty();
tp3.setLabel("Server password:");
tp3.setProperty("password");
tp3.setColumns(30);
tp3.setEditable(true);
tp3.setPassword(true);
tp3.setRequired(false);
tp3.addToControlPanel(panel);
ButtonBar controlBar = new ButtonBar();
controlBar.addConfiguredButton(new Button("Save properties", null, ActionType.OK));
controlBar.addConfiguredButton(new Button("Reset form", null, ActionType.RESET));
controlBar.setAlign(BorderLayout.EAST);
controlBar.setMargins(3, 3, 3, 3);
ControlPanel controlPanel = control.getPanel();
controlBar.applyStylesheet(controlPanel);
controlPanel.addButtonPanel(controlBar.getPanel());
controlBar.register(actionRegistry);
Properties props = new Properties();
props.setProperty("pasv", "true");
// control.initProperties(props);