public static JButton createButton(final String buttonText,final int mnemonic){
  final JButton newButton=new JButton(buttonText);
  newButton.setMnemonic(mnemonic);
  newButton.setFont(defaultMapXMLCreatorFont);
  newButton.setMargin(new Insets(2,5,2,5));
  return newButton;
}

public static JButton createButton ( final String buttonText , final int mnemonic ) { final JButton newButton = new JButton ( buttonText ) ; newButton . setMnemonic ( mnemonic ) ; newButton . setFont ( defaultMapXMLCreatorFont ) ; newButton . setMargin ( new Insets ( 2 , 5 , 2 , 5 ) ) ; return newButton ; }
creates a button with text and key code .
