01: package org.acm.seguin.tools.install;
02:
03: import java.awt.Color;
04: import java.awt.Dimension;
05: import java.awt.Graphics;
06: import javax.swing.JComponent;
07:
08: /**
09: * A class that will divide different features
10: *
11: *@author Chris Seguin
12: *@created September 17, 2002
13: */
14: public class Divider extends JComponent {
15: /**
16: * Constructor for the Divider object
17: */
18: public Divider() {
19: setMinimumSize(new Dimension(100, 2));
20: setPreferredSize(new Dimension(100, 2));
21: }
22:
23: public void adjustSize(int width) {
24: setMinimumSize(new Dimension(width, 2));
25: setPreferredSize(new Dimension(width, 2));
26: }
27:
28: /**
29: * Description of the Method
30: *
31: *@param g Description of the Parameter
32: */
33: public void paint(Graphics g) {
34: Dimension size = getSize();
35: g.setColor(Color.black);
36: g.fillRect(0, 0, size.width, size.height);
37: }
38: }
|