lHi there,
please remember to put a subject for the others to read message conveniently. Using 
fonts in Java 1.1 or 1.2 is rather quite simple. Given below is an example.
>From: Anjana Sharma <[EMAIL PROTECTED]>
>Subject: [none]
>  How to use Any kind of fonts in JAVA 1.1 applets.
>  Generally if i create a font with the font name,
>the font name is ignored and the default font is created.
>  Any link especially or examples for this problem.
>anjana
Example:
<start>
import java.applet.Applet; 
import java.awt.*; 
public class colorful extends Applet{ 

        Label l; 
        public void init(){ 
                setLayout(new GridLayout(1,1)); 
                l=new Label("Hello there!"); 
                Font font=new Font("Arial",Font.ITALIC+Font.BOLD,30); 
// the syntax is Font type, Font style, size of teh Font
                l.setFont(font); 
                add(l); 
        } 
} 
<END>
 The detailed documentation is available at the www.sun.java.com (JDK
documetation).
HTH
Pankaj Mathur
Bangkok  
 
 

--------------------------------------------------------------------------
LI is all for free speech, but this list was created for a purpose --
to help popularise Linux in India. If your messages are counterproductive
to that purpose, your privileges to submit messages can and will be revoked.

Reply via email to