public static JPanel createDialogButtonPanel(JButton[] jbPositives,JButton jbNegative,JButton[] jbOthers,boolean resizable,String insets){
  if (insets == null) {
    insets="";
  }
 else {
    insets+=",";
  }
  JPanel panel=new JPanel(new MigLayout(insets + "nogrid, fillx, aligny 100%"));
  if (jbPositives != null) {
    for (    JButton jButton : jbPositives) {
      panel.add(jButton,"tag ok");
    }
  }
  if (jbOthers != null) {
    for (    JButton jButton : jbOthers) {
      panel.add(jButton,"sgx");
    }
  }
  if (jbNegative != null) {
    panel.add(jbNegative,"tag cancel");
  }
  return panel;
}

public static JPanel createDialogButtonPanel ( JButton [ ] jbPositives , JButton jbNegative , JButton [ ] jbOthers , boolean resizable , String insets ) { if ( insets == null ) { insets = "" ; } else { insets += "," ; } JPanel panel = new JPanel ( new MigLayout ( insets + "nogrid, fillx, aligny 100%" ) ) ; if ( jbPositives != null ) { for ( JButton jButton : jbPositives ) { panel . add ( jButton , "tag ok" ) ; } } if ( jbOthers != null ) { for ( JButton jButton : jbOthers ) { panel . add ( jButton , "sgx" ) ; } } if ( jbNegative != null ) { panel . add ( jbNegative , "tag cancel" ) ; } return panel ; }
create a dialog button panel with the order and alignment dependent on the platform .
