Java Font.isTransformed()
Syntax
Font.isTransformed() has the following syntax.
public boolean isTransformed()
Example
In the following code shows how to use Font.isTransformed() method.
import java.awt.Font;
import java.awt.Graphics;
// www. j av a 2 s . c o m
import javax.swing.JFrame;
public class Main extends JFrame {
public static void main(String[] a) {
Main f = new Main();
f.setSize(300, 300);
f.setVisible(true);
}
public void paint(Graphics g) {
Font f = g.getFont();
System.out.println(f.isTransformed());
g.drawString("java2s.com", 4, 16);
}
}
Home »
Java Tutorial »
java.awt »
Java Tutorial »
java.awt »