aboutsummaryrefslogtreecommitdiff
path: root/src/uk/org/ury/frontend/HintField.java
blob: a43f1c39f459f5eba48a26dc6b4a50d82e6bdd2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/**
 * 
 */
package uk.org.ury.frontend;


import javax.swing.BorderFactory;
import javax.swing.JTextArea;


/**
 * A non-editable text area displaying a hint about how to use a 
 * frontend screen.
 * 
 * @author  Matt Windsor
 *
 */

public class HintField extends JTextArea
{
  /**
   * 
   */
  private static final long serialVersionUID = -6221888920919127273L;

  
  /**
   * Construct a new HintField with no initial hint.
   */
  
  public
  HintField ()
  {
    super ();
    
    setLineWrap (true);
    setWrapStyleWord (true);
    setEditable (false);
    setOpaque (false);
  }
  
  
  /**
   * Construct a new HintField.
   * 
   * @param hint  The hint to display in the HintField.
   */
  
  public
  HintField (String hint)
  {
    super (hint);
    
    setLineWrap (true);
    setWrapStyleWord (true);
    setEditable (false);
    setOpaque (false);
    setBorder (BorderFactory.createEmptyBorder (5, 5, 5, 5));
  }
}