BUT2/DEV/DEV2.1/TP06_Dessin/Q3_Acceuil/Q3Main.java~

34 lines
869 B
Java
Raw Permalink Normal View History

2023-10-23 13:23:36 +02:00
import javax.swing.*;
import java.awt.*;
public class Q3Main{
public static void main(String[] args) {
JFrame fenetre = new JFrame("Acceuil");
fenetre.setLocation(100, 100);
fenetre.setSize(288,215);
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
AfficheImage fond = new AfficheImage("login.jpg");
fond.setBounds(0, 0, 288, 215);
JTextField identifiant = new JTextField();
identifiant.setBounds(110, 105, 150, 30);
JTextField motDePasse = new JTextField();
motDePasse.setBounds(110, 145, 150, 30);
JPanel entrees = new JPanel();
entrees.setLayout(null);
entrees.setOpaque(false);
entrees.setBounds(0, 0, 288, 215);
entrees.add(identifiant);
entrees.add(motDePasse);
JPanel contenus = new JPanel(null);
contenus.add(fond);
contenus.add(entrees);
fenetre.setContentPane(contenus);
fenetre.setVisible(true);
}
}