DEV/DEV2.1/TP1/Saisie.java

23 lines
553 B
Java
Raw Normal View History

2023-02-10 11:52:05 +01:00
import javax.swing.*;
import java.awt.*;
public class Saisie
{
public static void main(String[] args)
{
JFrame fenetre = new JFrame();
fenetre.setSize(500, 300);
fenetre.setLocation(0, 0);
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JTextField txt = new JTextField();
txt.setBounds(0,100,500,300);
fenetre.add(txt, BorderLayout.SOUTH);
JTextArea txt2 = new JTextArea();
txt2.setVerticalAlignment(JTextArea.CENTER);
fenetre.add(txt2, BorderLayout.CENTER);
fenetre.setVisible(true);
}
}