Anglish
BD
DEV
DEV1.1
DEV1.1_suite
DEV2.1
CM1
Controle_Machine_blanc
TP01_Introduction
TP02_Composants_graphiques
Q1_Sirocco.class
Q1_Sirocco.java
Q1_Sirocco.java~
Q2_Boutons.class
Q2_Boutons.java
Q2_Boutons.java~
Q3_Saisie.class
Q3_Saisie.java
Q3_Saisie.java~
Q4_Choix.class
Q4_Choix.java
Q4_Choix.java~
Q5_Contingences.class
Q5_Contingences.java
Q5_Contingences.java~
TP03_Mise_en_page
TP04_Classes_et_objets
TP05_Heritage
TP06_Dessin
TP07_Polymorphisme
TP08_Evenement
TP09_Evenement2
TP10_exceptions.java
TP11_Flux_d'octets
TP12_Flux_d_octets_suite
TP15_DCU_et_DC
TP16
test
Q1_Demarage.java~
Q2_Arguments.java~
Q3_Somme.java~
Q4_Grille.java~
Q4_Tri.java~
Q5_Grille.java~
diagramme_de_classe.txt~
DEV2.3
DEV3.1
DEV3.2
DEV_Madelaine
DEV_William
Docker
EC
Math
PHP
SAE
SCR
rien
32 lines
838 B
Java
32 lines
838 B
Java
|
import javax.swing.*;
|
||
|
import java.awt.*;
|
||
|
|
||
|
public class Q3_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);
|
||
|
|
||
|
Font myFont1 = new Font("Arial", Font.BOLD, 14);
|
||
|
|
||
|
JTextField champsTexte = new JTextField("");
|
||
|
champsTexte.setBackground(new Color(206,206,206));
|
||
|
champsTexte.setForeground(Color.GREEN);
|
||
|
champsTexte.setFont(myFont1);
|
||
|
fenetre.add(champsTexte, BorderLayout.SOUTH);
|
||
|
|
||
|
|
||
|
JTextArea zoneTexte = new JTextArea("Saisissez votre texte");
|
||
|
zoneTexte.setBackground(new Color(0,0,0));
|
||
|
zoneTexte.setForeground(new Color(30,220,30));
|
||
|
zoneTexte.setFont(myFont1);
|
||
|
fenetre.add(zoneTexte);
|
||
|
|
||
|
|
||
|
fenetre.setVisible(true);
|
||
|
}
|
||
|
}
|