Grosse session de travail

This commit is contained in:
Vieira
2022-03-28 15:12:08 +02:00
parent a2dc8eab26
commit 86b8708e25
13 changed files with 146 additions and 3 deletions

Binary file not shown.

View File

@@ -0,0 +1,52 @@
import javax.swing.*;
import java.awt.*;
public class Accueil extends JComponent{
private Image logScreen;
public Accueil(){
super();
this.logScreen = Toolkit.getDefaultToolkit().getImage("logScreen.jpg");
}
@Override
protected void paintComponent(Graphics pinceau){
Graphics secondPinceau = pinceau.create();
if (this.isOpaque()){
secondPinceau.setColor(this.getBackground());
secondPinceau.fillRect(0, 0, this.getWidth(), this.getHeight());
}
secondPinceau.drawImage(this.logScreen,0,0, this);
}
public static void main(String[] args){
JFrame fenetre = new JFrame();
fenetre.setSize(295, 223);
fenetre.setMinimumSize(new Dimension(295, 223));
fenetre.setLocation(100, 100);
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
fenetre.setLayout(null);
Accueil login = new Accueil();
login.setLocation(0,0);
login.setSize(278,183);
fenetre.add(login);
JTextField loginArea = new JTextField();
loginArea.setLocation(110, 90);
loginArea.setSize(150, 25);
fenetre.add(loginArea);
JTextField passwordArea = new JTextField();
passwordArea.setLocation(110, 130);
passwordArea.setSize(150, 25);
fenetre.add(passwordArea);
fenetre.setVisible(true);
}
}

View File

@@ -0,0 +1,18 @@
import java.lang.*;
public class Accueil_test extends JPanel{
private Image menuAcc;
public Accueil_test(){
super();
this.menuAcc = Toolkit.getDefaultToolkit().getImage("menuAcc.jpg");
}
@Override
protected void paintComponent(Graphics pinceau){
Graphics secondPinceau = pinceau.create();
if (this.isOpaque()){
secondPinceau.setColor(this.getBackground());
secondPinceau.fillRect(0, 0, this.getWidth(), this.getHeight());
}
secondPinceau.drawImage(this.menuAcc,0,0, this);
}
}