This commit is contained in:
2022-03-08 17:15:30 +01:00
parent a5665f3b23
commit ae43ed1b4f
18 changed files with 185 additions and 19 deletions

Binary file not shown.

View File

@@ -0,0 +1,32 @@
import javax.swing.*;
import java.awt.*;
public class Accueil {
public static void main(String[] args) {
JFrame f = new JFrame("Accueil");
f.setSize(285, 200);
f.setLocation(100, 100);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setLayout(null);
LoginScreen login = new LoginScreen();
login.setLocation(0, 0);
login.setSize(278, 183);
f.add(login);
JTextField loginLabel = new JTextField();
loginLabel.setBackground(new Color(0, 0, 0, 0));
loginLabel.setLocation(100, 90);
loginLabel.setSize(170, 30);
f.add(loginLabel);
JTextField passLabel = new JTextField();
passLabel.setBackground(new Color(0, 0, 0, 0));
passLabel.setLocation(100, 130);
passLabel.setSize(170, 30);
f.add(passLabel);
f.setResizable(false);
f.setVisible(true);
}
}

Binary file not shown.

View File

@@ -0,0 +1,22 @@
import javax.swing.*;
import java.awt.*;
public class LoginScreen extends JComponent {
private Image login;
public LoginScreen() {
super();
this.login = Toolkit.getDefaultToolkit().getImage("login.jpg");
}
@Override
protected void paintComponent(Graphics brush) {
Graphics newBrush = brush.create();
if (this.isOpaque()) {
newBrush.setColor(this.getBackground());
newBrush.fillRect(0, 0, this.getWidth(), this.getHeight());
}
newBrush.drawImage(this.login, 0, 0, this);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB