This commit is contained in:
2024-03-18 13:54:22 +01:00
parent eb581c8a31
commit a28bef01d7
69 changed files with 855 additions and 5 deletions

Binary file not shown.

View File

@@ -0,0 +1,18 @@
/*La classe String vient du package java.lang et hérite de la classe
Object. Il y a 8 méthodes transmise de Object.*/
import javax.swing.*;
import java.awt.*;
public class Documentation {
public void Majuscule(String[] args) {
System.out.print(args[0].toUpperCase());
for (int i=1; i<args.length; i++){
System.out.print(" "+args[i].toUpperCase());
}
System.out.println();
}
public void Base16(String[] args) {
int n=Integer.parseInt(args[0],8);
System.out.println(Integer.toHexString(n));
}
}

Binary file not shown.

View File

@@ -0,0 +1,20 @@
import javax.swing.*;
import java.awt.*;
import couleur.Gris;
public class Grisaille {
public static void main(String[] args) {
Color ton1 = new Gris(155);
Color ton2 = new Gris(75);
JFrame fenetre = new JFrame();
fenetre.setSize(500, 300);
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JTextField etiquette = new JTextField();
JTextArea etiquette2 = new JTextArea();
etiquette.setBackground(ton1);
etiquette2.setBackground(ton2);
fenetre.add(etiquette, BorderLayout.SOUTH);
fenetre.add(etiquette2, BorderLayout.CENTER);
fenetre.setVisible(true);
}
}

Binary file not shown.

View File

@@ -0,0 +1,9 @@
package couleur;
import javax.swing.*;
import java.awt.*;
public class Gris extends Color{
public Gris(int n) {
super(n,n,n);
}
}

View File

@@ -0,0 +1,14 @@
package metrique;
import javax.swing.*;
import java.awt.*;
public class PaperM extends Paper{
public PaperM() {
super();
this.setSize(21.0,29.7);
this.setImageableArea(21.0,29.7,19.5,28.2);
}
public getMetricHeight(){
}
/*a complété mais juste à faire des convertion*/
}