package AWT;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public class FontTEst {
/**
* @param args
*/
public static void main(String[] args) {
Frame f=new Frame("Font TEst");
f.setSize(200,200);
f.setLayout(new GridLayout(5,1));
Label l1=new Label("Serif");
l1.setFont(new Font("Serif",Font.PLAIN,20));
Label l2=new Label("SansSerif");
l1.setFont(new Font("SansSerif",Font.PLAIN,20));
Label l3=new Label("Monospaced");
l1.setFont(new Font("Monospaced",Font.ITALIC,20));
Label l4=new Label("Dialog");
l1.setFont(new Font("Dialog",Font.BOLD,20));
Label l5=new Label("DialogInput");
l1.setFont(new Font("DialogInput",Font.BOLD|Font.PLAIN,20));
f.add(l1);f.add(l2);f.add(l3);f.add(l4);f.add(l5);
f.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
System.exit(0);
}
});
f.setVisible(true);
}
}
No hay comentarios:
Publicar un comentario