pnl.setLayout(new FlowLayout(FlowLayout.CENTER));
pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
// -- upload button
UploadAction uploadAction = new UploadAction();
pnl.add(btnUpload = new SideButton(uploadAction));
btnUpload.setFocusable(true);
InputMapUtils.enableEnter(btnUpload);
// -- cancel button
CancelAction cancelAction = new CancelAction();
pnl.add(new SideButton(cancelAction));
getRootPane().registerKeyboardAction(
cancelAction,
KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0),
JComponent.WHEN_IN_FOCUSED_WINDOW
);
pnl.add(new SideButton(new ContextSensitiveHelpAction(ht("/Dialog/Upload"))));
HelpUtil.setHelpContext(getRootPane(),ht("/Dialog/Upload"));
return pnl;
}