update
This commit is contained in:
@@ -1,8 +1,30 @@
|
|||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JTextArea;
|
||||||
|
import javax.swing.JTextField;
|
||||||
|
|
||||||
public class Contingences {
|
public class Contingences {
|
||||||
public static void main(String[] args){
|
public static void main(String[] args){
|
||||||
JFrame frame = new JFrame("Choix");
|
JFrame frame = new JFrame("Choix");
|
||||||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
|
|
||||||
|
|
||||||
|
JTextArea textarea = new JTextArea();
|
||||||
|
JTextField saisie = new JTextField();
|
||||||
|
|
||||||
|
textarea.setBackground(new Color(0, 0, 0));
|
||||||
|
saisie.setBackground(new Color(128, 128, 128));
|
||||||
|
textarea.setForeground(new Color(0, 128, 0));
|
||||||
|
saisie.setForeground(new Color(0, 128, 0).darker());
|
||||||
|
|
||||||
|
textarea.setLineWrap(true);
|
||||||
|
saisie.setLineWrap(true);
|
||||||
|
|
||||||
|
textarea.setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_AS_NEEDED);
|
||||||
|
|
||||||
|
fenetre.add(saisie, BorderLayout.SOUTH);
|
||||||
|
fenetre.add(textarea, BorderLayout.CENTER);
|
||||||
|
|
||||||
|
|
||||||
frame.setSize(1000,500);
|
frame.setSize(1000,500);
|
||||||
frame.setLocation(500,250);
|
frame.setLocation(500,250);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
|
@@ -17,6 +17,7 @@ public class Saisie {
|
|||||||
|
|
||||||
fenetre.add(saisie, BorderLayout.SOUTH);
|
fenetre.add(saisie, BorderLayout.SOUTH);
|
||||||
fenetre.add(textarea, BorderLayout.CENTER);
|
fenetre.add(textarea, BorderLayout.CENTER);
|
||||||
|
|
||||||
fenetre.setSize(500, 300);
|
fenetre.setSize(500, 300);
|
||||||
fenetre.setLocation(500,250);
|
fenetre.setLocation(500,250);
|
||||||
fenetre.setVisible(true);
|
fenetre.setVisible(true);
|
||||||
|
Reference in New Issue
Block a user