KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jdepend > swingui > StatusPanel


1 package jdepend.swingui;
2
3 import javax.swing.JComponent JavaDoc;
4 import javax.swing.JPanel JavaDoc;
5 import javax.swing.BoxLayout JavaDoc;
6
7 /**
8  * The <code>StatusPanel</code> class defines the status-related UI
9  * components.
10  * <p>
11  * This panel primarily contains either a text field or a progress bar.
12  *
13  * @author <b>Mike Clark</b>
14  * @author Clarkware Consulting, Inc.
15  */

16
17 public class StatusPanel extends JPanel JavaDoc {
18
19     /**
20      * Constructs a <code>StatusPanel</code>.
21      */

22     public StatusPanel() {
23         super();
24         setLayout(new BoxLayout JavaDoc(this, BoxLayout.Y_AXIS));
25     }
26
27     /**
28      * Sets the specified component as the current status component of this
29      * panel.
30      *
31      * @param component Status component.
32      */

33     public void setStatusComponent(JComponent JavaDoc component) {
34         removeAll();
35         add(component);
36         repaint();
37         validate();
38     }
39 }
Popular Tags