/** * Standard constructor - creates panel with the specified button labels. * * @param label1 the label for button 1. * @param label2 the label for button 2. * @param label3 the label for button 3. * @param label4 the label for button 4. */ public L1R3ButtonPanel(final String label1, final String label2, final String label3, final String label4) { setLayout(new BorderLayout()); // create the pieces... final JPanel panel = new JPanel(new BorderLayout()); final JPanel panel2 = new JPanel(new BorderLayout()); this.left = new JButton(label1); this.right1 = new JButton(label2); this.right2 = new JButton(label3); this.right3 = new JButton(label4); // ...and put them together panel.add(this.left, BorderLayout.WEST); panel2.add(this.right1, BorderLayout.EAST); panel.add(panel2, BorderLayout.CENTER); panel.add(this.right2, BorderLayout.EAST); add(panel, BorderLayout.CENTER); add(this.right3, BorderLayout.EAST); }
/** * Standard constructor - creates panel with the specified button labels. * * @param label1 the label for button 1. * @param label2 the label for button 2. * @param label3 the label for button 3. * @param label4 the label for button 4. */ public L1R3ButtonPanel(final String label1, final String label2, final String label3, final String label4) { setLayout(new BorderLayout()); // create the pieces... final JPanel panel = new JPanel(new BorderLayout()); final JPanel panel2 = new JPanel(new BorderLayout()); this.left = new JButton(label1); this.right1 = new JButton(label2); this.right2 = new JButton(label3); this.right3 = new JButton(label4); // ...and put them together panel.add(this.left, BorderLayout.WEST); panel2.add(this.right1, BorderLayout.EAST); panel.add(panel2, BorderLayout.CENTER); panel.add(this.right2, BorderLayout.EAST); add(panel, BorderLayout.CENTER); add(this.right3, BorderLayout.EAST); }
/** * Standard constructor - creates panel with the specified button labels. * * @param label1 the label for button 1. * @param label2 the label for button 2. * @param label3 the label for button 3. * @param label4 the label for button 4. */ public L1R3ButtonPanel(final String label1, final String label2, final String label3, final String label4) { setLayout(new BorderLayout()); // create the pieces... final JPanel panel = new JPanel(new BorderLayout()); final JPanel panel2 = new JPanel(new BorderLayout()); this.left = new JButton(label1); this.right1 = new JButton(label2); this.right2 = new JButton(label3); this.right3 = new JButton(label4); // ...and put them together panel.add(this.left, BorderLayout.WEST); panel2.add(this.right1, BorderLayout.EAST); panel.add(panel2, BorderLayout.CENTER); panel.add(this.right2, BorderLayout.EAST); add(panel, BorderLayout.CENTER); add(this.right3, BorderLayout.EAST); }