Howow to use font object Java
Font smallFont = new Font("Monospaced", Font.PLAIN, 10);
Font bigFont = new Font("Serif", Font.BOLD, 18);
Howow to use font object Java
Font smallFont = new Font("Monospaced", Font.PLAIN, 10);
Font bigFont = new Font("Serif", Font.BOLD, 18);
java font
setFont (new Font ("TimesRoman", Font.BOLD/Font.PLAIN/Font.ITALIC, 20));
font parameters java
public Font (java.lang.String name, int style, int size)
how to format font in java
import java.awt.*;
import java.applet.*;
public class font extends Applet
{
Font f1,f2,f3;
public void init()
{
f1 = new Font("Arial",Font.BOLD,18);
f2 = new Font("Forte",Font.PLAIN,24);
f3 = new Font("Elephant",Font.ITALIC,28);
}
public void paint(Graphics g)
{
g.drawString("Senthil",50,50);
g.setFont(f1);
g.drawString("Velan",50,80);
g.setFont(f2);
g.drawString("Vicky",50,110);
g.setFont(f3);
g.drawString("Vignesh",50,140);
}
}
/* <applet code = "fon.class" height = 500 width =500>
</applet> */
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us