public JComponent createPropertyGUI(String prefix,Properties props,Properties info){
  JComponent component=createEmbeddedPropertyGUI(prefix,props,info);
  JButton doneButton=null, cancelButton=null;
  JPanel buttons=new JPanel();
  if (print) {
    doneButton=new JButton(i18n.get(Inspector.class,"Print","Print"));
    cancelButton=new JButton(i18n.get(Inspector.class,"Quit","Quit"));
  }
 else {
    doneButton=new JButton(i18n.get(Inspector.class,"Ok","Ok"));
    cancelButton=new JButton(i18n.get(Inspector.class,"Cancel","Cancel"));
  }
  doneButton.addActionListener(this);
  doneButton.setActionCommand(doneCommand);
  cancelButton.addActionListener(this);
  cancelButton.setActionCommand(cancelCommand);
  buttons.add(doneButton);
  buttons.add(cancelButton);
  component.add(buttons,BorderLayout.SOUTH);
  component.validate();
  return component;
}

public JComponent createPropertyGUI ( String prefix , Properties props , Properties info ) { JComponent component = createEmbeddedPropertyGUI ( prefix , props , info ) ; JButton doneButton = null , cancelButton = null ; JPanel buttons = new JPanel ( ) ; if ( print ) { doneButton = new JButton ( i18n . get ( Inspector . class , "Print" , "Print" ) ) ; cancelButton = new JButton ( i18n . get ( Inspector . class , "Quit" , "Quit" ) ) ; } else { doneButton = new JButton ( i18n . get ( Inspector . class , "Ok" , "Ok" ) ) ; cancelButton = new JButton ( i18n . get ( Inspector . class , "Cancel" , "Cancel" ) ) ; } doneButton . addActionListener ( this ) ; doneButton . setActionCommand ( doneCommand ) ; cancelButton . addActionListener ( this ) ; cancelButton . setActionCommand ( cancelCommand ) ; buttons . add ( doneButton ) ; buttons . add ( cancelButton ) ; component . add ( buttons , BorderLayout . SOUTH ) ; component . validate ( ) ; return component ; }
creates a jcomponent with the properties to be changed . this component is suitable for inclusion into a gui . don ' t use this method directly ! use the createpropertygui ( propertyconsumer ) instead . you will get a nullpointerexception if you use this method without setting the propertyconsumer in the inspector .
