public static JPanel createDialogButtonPanel(JButton jbPositive,JButton jbNegative){
  JPanel panel=new JPanel(new MigLayout("insets 0, nogrid, fillx, aligny 100%"));
  if (jbPositive != null) {
    panel.add(jbPositive,"tag ok");
  }
  if (jbNegative != null) {
    panel.add(jbNegative,"tag cancel");
  }
  return panel;
}

public static JPanel createDialogButtonPanel ( JButton jbPositive , JButton jbNegative ) { JPanel panel = new JPanel ( new MigLayout ( "insets 0, nogrid, fillx, aligny 100%" ) ) ; if ( jbPositive != null ) { panel . add ( jbPositive , "tag ok" ) ; } if ( jbNegative != null ) { panel . add ( jbNegative , "tag cancel" ) ; } return panel ; }
create a dialog button panel with the order and alignment dependent on the platform . < br > this method creates zero spacing around the buttons .
