1 33 34 package edu.rice.cs.drjava.ui.config; 35 36 import javax.swing.*; 37 import java.awt.*; 38 39 43 public class LabelComponent extends OptionComponent<Object > { 44 private JTextArea _text; 45 46 public LabelComponent(String text, Frame parent) { 47 super("", parent); 48 _text = new JTextArea(text); 49 _text.setEditable(false); 50 _text.setBackground(parent.getBackground()); 51 } 53 54 public LabelComponent(String text, Frame parent, String description) { 55 this(text, parent); 56 setDescription(description); 57 } 58 59 public void setDescription(String description) { 60 _text.setToolTipText(description); 61 _label.setToolTipText(description); 62 } 63 64 68 public boolean updateConfig() { 69 return true; 70 } 71 72 75 public void setValue(Object value) { 76 } 77 78 81 public JComponent getComponent() { return _text; } 82 83 } | Popular Tags |