This commit is contained in:
unknown
2022-01-14 06:54:18 +01:00
commit d9949b5cb0
288 changed files with 6425 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
import javax.swing.*;
import java.awt.*;
public class formes extends JComponent{
protected void paintComponent(Graphics pinceau){
Graphics secondPinceau = pinceau.create();
secondPinceau.setColor(Color.BLUE);
secondPinceau.drawRect(0,0,50,50);
secondPinceau.setColor(Color.GREEN);
secondPinceau.drawOval(50,60,25,25);
secondPinceau.fillOval(50,60,25,25);
Color couleur1 = new Color(148,0,211);
secondPinceau.setColor(couleur1);
secondPinceau.setFont(new Font(Font.SERIF,Font.BOLD,24));
secondPinceau.drawString(">o<",100,150);
Image image = Toolkit.getDefaultToolkit().getImage("cercles.png");
secondPinceau.drawImage(image,10,20,this);
}
public static void main(String[] args){
formes a = new formes();
JFrame fenetre = new JFrame();
fenetre.setSize(500,500);
fenetre.setLocation(100,100);
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
fenetre.add(a);
fenetre.setVisible(true);
}
}