|
import javax.swing.*;
import java.awt.*;
public class Teste extends JFrame {
public Teste(){
super("teste");
this.setBounds(100,100,200,200);
this.setVisible(true);
}
public static void main(String args[]){
new Teste();
}
public void paint(Graphics g) {
Graphics2D g2 = (Graphics2D)g;
Font fonte = new Font("TimesRoman ",Font.BOLD,30);
g2.setFont(fonte);
g2.drawString("bonjour",50,50);
}
}
|