1 39 40 41 package org.krysalis.jcharts.designer.common; 42 43 44 import javax.swing.*; 45 import java.awt.*; 46 47 48 public class LabelledTextfield extends JPanel 49 { 50 private JLabel jLabel; 51 private JTextField textField; 52 53 54 59 public LabelledTextfield( String label, int size ) 60 { 61 super(); 62 63 this.jLabel = new JLabel( label ); 64 this.textField = new JTextField( size ); 65 66 this.setLayout( new FlowLayout() ); 67 this.add( this.jLabel ); 68 this.add( this.textField ); 69 } 70 71 72 76 public String getText() { 77 return this.textField.getText(); 78 } 79 80 public void setText( String text ) 81 { 82 this.textField.setText( text ); 83 } 84 } 85 | Popular Tags |