1 39 40 41 package org.krysalis.jcharts.designer.common; 42 43 44 import javax.swing.*; 45 46 import java.awt.*; 47 48 49 public class LabelledCheckbox extends JPanel 50 { 51 private JLabel jLabel; 52 private JCheckBox checkbox; 53 54 55 59 public LabelledCheckbox( String label ) 60 { 61 super(); 62 63 this.jLabel = new JLabel( label ); 64 this.checkbox = new JCheckBox(); 65 66 this.setLayout( new FlowLayout() ); 67 this.add( this.jLabel ); 68 this.add( this.checkbox ); 69 } 70 71 72 public boolean isSelected() 73 { 74 return this.checkbox.isSelected(); 75 } 76 77 public void setSelected( boolean selected ) 78 { 79 this.checkbox.setSelected( selected ); 80 } 81 } 82 | Popular Tags |