import javax.swing.*;
import java.awt.*;

/**
 * This class must be the super class of all UIs for DigitalComponents but it should be an interface.
 * <BR>You can read the source of this class <A HREF="./DigitalComponentUI.java.html"> here</A>.
 */
public class DigitalComponentUI extends JFrame {

	public DigitalComponentUI(String n) {
		setResizable (false);
		setTitle (n);

		Container c = getContentPane();
		c.setLayout(new FlowLayout());

		sp = new JScrollPane();
		sp.setPreferredSize(new Dimension(200, 100));
		sp.setMinimumSize(new Dimension(200, 100));
		sp.setMaximumSize(new Dimension(200, 100));
		c.add(sp);

		ta = new JTextArea();
		ta.setEditable(false);
		ta.setFont (new java.awt.Font ("Monospaced", 0, 12));
		sp.setViewportView(ta);

		pack();
		show();
	}

	public void refresh(String s) {
		ta.setText(s);
	}

	protected JTextArea ta;
	protected JScrollPane sp;
}