import java.applet.*;
import java.awt.*;
import javax.swing.JEditorPane;
import javax.swing.JFrame;
import java.io.*;

public class MultiColour extends Applet
{
  JEditorPane editorPane = null;

  public MultiColour(int width, int height) {
    createPane(width, height);
	}

  public MultiColour() {
    createPane(400, 400);

    setLayout(new BorderLayout());

    add(editorPane, BorderLayout.CENTER);
  }

  public void createPane(int width, int height) {
    String text = "<HTML><BODY><FONT COLOR=\"#FF0000\">Red text</FONT></BODY></HEAD>";

    editorPane = new JEditorPane();
    editorPane.setContentType("text/html");
    editorPane.setEditable(false);
    editorPane.setText(text);
  }

	public static void main(String[] argv) {
    int width = 400;
    int height = 400;

		MultiColour mu = new MultiColour(width, height);

    JFrame frame = new JFrame();
    frame.getContentPane().setLayout(new BorderLayout());

    frame.getContentPane().add(mu.editorPane,
     BorderLayout.CENTER);

    frame.setSize(width, height);
    frame.setVisible(true);
	}
}

