Create Italic Font - Java 2D Graphics

Java examples for 2D Graphics:Font

Description

Create Italic Font

Demo Code

 
import java.applet.Applet;
import java.awt.Font;
import java.awt.Graphics;
 
public class Main {
        public void paint(Graphics g) {
                Font myFont = new Font("Courier", Font.ITALIC,20);
                g.setFont(myFont);/*from   w  ww. j  a  v a 2s  . com*/
                g.drawString("Italic Font Example", 10, 50);
        }
}

Related Tutorials