Font with 3D effectTag(s): AWT


import java.awt.*;
import java.applet.*;

public class SimpleApplet extends Applet {

    public void init() {
        setBackground(new Color(255,255,255)); // white    
     }

    public void paint(Graphics g) {
        g.setFont(new Font("Helvetica", Font.PLAIN, 42));
        g.setColor(new Color(0,0,0)); // black
        g.drawString("Real's HowTo", 100, 100);
        g.drawString("Real's HowTo", 101, 101);
        g.setColor(getBackground());
        g.drawString("Real's HowTo", 100, 100);

        g.setColor(new Color(0,0,0)); // black
        g.drawString("Real's HowTo", 100, 200);
        g.setColor(new Color(0,0,255)); // blue
        g.drawString("Real's HowTo", 102, 202);
        g.setColor(getBackground());
        g.drawString("Real's HowTo", 101, 201);

    }
}

<HTML>
  <TABLE><TR><TD>
  <APPLET CODE=SimpleApplet.class WIDTH=410 HEIGHT=500>
  </APPLET>
</HMTL>
try it here
blog comments powered by Disqus