Пример #1
0
  private Component getCommandButtons() {
    Box panel = new Box(BoxLayout.X_AXIS);
    butUpload = new MButton(resources.getString("text.upload"));
    butUpload.addActionListener(this);
    getRootPane().setDefaultButton(butUpload);
    butCancel = new MButton(CommonResources.getString("text.cancel"));
    butCancel.addActionListener(this);
    butHelp = new MButton(CommonResources.getString("text.help"));
    JFTPHelp2.getInstance().enableHelp(butHelp, HELP_ID);

    panel.add(butUpload);
    panel.add(Box.createRigidArea(new Dimension(5, 0)));
    panel.add(butCancel);
    panel.add(Box.createRigidArea(new Dimension(5, 0)));
    panel.add(butHelp);

    return panel;
  }
Пример #2
0
 @Override
 protected void escape() {
   butCancel.doClick();
 }