public InputFieldDialog(final String CAPTION_KEY,final String LABEL_KEY){
  String caption=I18n.tr(CAPTION_KEY);
  Frame frame=GUIMediator.getAppFrame();
  _dialog=new JDialog(frame,caption,true);
  _dialog.setSize(340,180);
  LabeledComponent component=new LabeledComponent(LABEL_KEY,TEXT_FIELD,LabeledComponent.LEFT_GLUE);
  String[] buttonLabelKeys={I18n.tr("OK"),I18n.tr("Cancel")};
  String[] buttonLabelTips={I18n.tr("Apply Operation"),I18n.tr("Cancel Operation")};
  ActionListener[] buttonListeners={new OKListener(),new CancelListener()};
  ButtonRow buttons=new ButtonRow(buttonLabelKeys,buttonLabelTips,buttonListeners,ButtonRow.X_AXIS,ButtonRow.LEFT_GLUE);
  Container contentPane=_dialog.getContentPane();
  BoxPanel componentPanel=new BoxPanel(BoxPanel.Y_AXIS);
  componentPanel.add(Box.createVerticalGlue());
  componentPanel.add(component.getComponent());
  componentPanel.add(Box.createVerticalGlue());
  MAIN_PANEL.add(componentPanel);
  MAIN_PANEL.add(Box.createVerticalGlue());
  MAIN_PANEL.add(buttons);
  contentPane.add(MAIN_PANEL);
}

public InputFieldDialog ( final String CAPTION_KEY , final String LABEL_KEY ) { String caption = I18n . tr ( CAPTION_KEY ) ; Frame frame = GUIMediator . getAppFrame ( ) ; _dialog = new JDialog ( frame , caption , true ) ; _dialog . setSize ( 340 , 180 ) ; LabeledComponent component = new LabeledComponent ( LABEL_KEY , TEXT_FIELD , LabeledComponent . LEFT_GLUE ) ; String [ ] buttonLabelKeys = { I18n . tr ( "OK" ) , I18n . tr ( "Cancel" ) } ; String [ ] buttonLabelTips = { I18n . tr ( "Apply Operation" ) , I18n . tr ( "Cancel Operation" ) } ; ActionListener [ ] buttonListeners = { new OKListener ( ) , new CancelListener ( ) } ; ButtonRow buttons = new ButtonRow ( buttonLabelKeys , buttonLabelTips , buttonListeners , ButtonRow . X_AXIS , ButtonRow . LEFT_GLUE ) ; Container contentPane = _dialog . getContentPane ( ) ; BoxPanel componentPanel = new BoxPanel ( BoxPanel . Y_AXIS ) ; componentPanel . add ( Box . createVerticalGlue ( ) ) ; componentPanel . add ( component . getComponent ( ) ) ; componentPanel . add ( Box . createVerticalGlue ( ) ) ; MAIN_PANEL . add ( componentPanel ) ; MAIN_PANEL . add ( Box . createVerticalGlue ( ) ) ; MAIN_PANEL . add ( buttons ) ; contentPane . add ( MAIN_PANEL ) ; }
constructs an input field using the specified locale - specific keys for both the caption and the field label .
