1 44 45 package org.jfree.ui; 46 47 import java.awt.BorderLayout ; 48 import java.awt.GridLayout ; 49 50 import javax.swing.JButton ; 51 import javax.swing.JPanel ; 52 53 59 public class L1R2ButtonPanel extends JPanel { 60 61 62 private JButton left; 63 64 65 private JButton right1; 66 67 68 private JButton right2; 69 70 77 public L1R2ButtonPanel(final String label1, final String label2, final String label3) { 78 79 setLayout(new BorderLayout ()); 80 81 this.left = new JButton (label1); 83 84 final JPanel rightButtonPanel = new JPanel (new GridLayout (1, 2)); 85 this.right1 = new JButton (label2); 86 this.right2 = new JButton (label3); 87 rightButtonPanel.add(this.right1); 88 rightButtonPanel.add(this.right2); 89 90 add(this.left, BorderLayout.WEST); 92 add(rightButtonPanel, BorderLayout.EAST); 93 94 } 95 96 101 public JButton getLeftButton() { 102 return this.left; 103 } 104 105 110 public JButton getRightButton1() { 111 return this.right1; 112 } 113 114 119 public JButton getRightButton2() { 120 return this.right2; 121 } 122 123 } 124 | Popular Tags |