/** * Builds and returns a right aligned bar with help and other buttons. * * @param help the help button to add on the left side * @param buttons an array of buttons to add * @return a right aligned button bar with the given buttons */ public static JPanel buildHelpBar(JButton help, JButton... buttons) { ButtonBarBuilder2 builder = new ButtonBarBuilder2(); builder.addButton(help); builder.addUnrelatedGap(); builder.addGlue(); builder.addButton(buttons); return builder.getPanel(); }