import java.awt.*; public class NoEditArea extends TextArea { Color bg; public NoEditArea() { super("", 0, 0, SCROLLBARS_VERTICAL_ONLY); setEditable(false); bg = new Color(102, 153, 153); } public void setBackground(Color col) { bg = col; super.setBackground(col); } public Color getBackground() { return bg; } public static void main() { Frame f = new Frame(); f.add(new NoEditArea()); f.pack(); f.setVisible(true); } }