1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
| import java.awt.*;
import java.io.*;
import javax.swing.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
public class ProgExtLIN extends JFrame{ //-------------------VARIABLES & BOUTONS-------------------//
static JButton validerbutton; // Déclaration des boutons
static JButton exportation;
static JButton annulation;
static JButton effacer;
static JCheckBox choix;
static JCheckBox choix2;
static JCheckBox choix3;
static String word;
static String word2;
static String word3;
static JScrollPane sp;
static File fichier = null;
public ProgExtLIN(){
setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\danie\\Pictures\\Faurecia.jpg"));
getContentPane().setBackground(Color.LIGHT_GRAY);
setSize(500, 300); // Définit taille JFrame : 400 pixels de large et 100 pixels de haut
setTitle("FAURECIA - Data Extractor"); // Définit un titre pour notre fenêtre
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().setLayout(null);
JPanel panChoix = new JPanel();
panChoix.setBounds(0, 0, 482, 66);
panChoix.setBackground(Color.LIGHT_GRAY);
getContentPane().add(panChoix);
panChoix.setLayout(null);
JPanel panText = new JPanel();
panText.setBounds(0, 65, 482, 152);
panText.setBackground(Color.DARK_GRAY);
getContentPane().add(panText);
panText.setLayout(null);
JPanel panFin = new JPanel();
panFin.setBounds(0, 216, 482, 37);
getContentPane().add(panFin);
JCheckBox chckbxLin = new JCheckBox("LIN");
chckbxLin.setBounds(29, 0, 49, 27);
chckbxLin.setFont(new Font("Calibri Light", chckbxLin.getFont().getStyle() & ~Font.BOLD & ~Font.ITALIC, 15));
chckbxLin.setBackground(Color.LIGHT_GRAY);
chckbxLin.setForeground(Color.BLACK);
panChoix.add(chckbxLin);
JCheckBox chckbxRffMh = new JCheckBox("RFF - MH");
chckbxRffMh.setBounds(191, 0, 83, 27);
chckbxRffMh.setFont(new Font("Calibri Light", Font.PLAIN, 15));
chckbxRffMh.setBackground(Color.LIGHT_GRAY);
chckbxRffMh.setForeground(Color.BLACK);
panChoix.add(chckbxRffMh);
JCheckBox chckbxRffAde = new JCheckBox("RFF - ADE");
chckbxRffAde.setBounds(373, 0, 85, 27);
chckbxRffAde.setFont(new Font("Calibri Light", Font.PLAIN, 15));
chckbxRffAde.setForeground(Color.BLACK);
chckbxRffAde.setBackground(Color.LIGHT_GRAY);
panChoix.add(chckbxRffAde);
JSpinner compLIN = new JSpinner();
compLIN.setFont(new Font("Calibri Light", Font.PLAIN, 15));
compLIN.setBounds(62, 30, 30, 22);
panChoix.add(compLIN);
JSpinner fieldLIN = new JSpinner();
fieldLIN.setFont(new Font("Calibri Light", Font.PLAIN, 15));
fieldLIN.setBounds(12, 30, 30, 22);
panChoix.add(fieldLIN);
JSpinner fieldMH = new JSpinner();
fieldMH.setFont(new Font("Calibri Light", Font.PLAIN, 15));
fieldMH.setBounds(193, 30, 30, 22);
panChoix.add(fieldMH);
JSpinner compMH = new JSpinner();
compMH.setFont(new Font("Calibri Light", Font.PLAIN, 15));
compMH.setBounds(244, 30, 30, 22);
panChoix.add(compMH);
JSpinner fieldADE = new JSpinner();
fieldADE.setFont(new Font("Calibri Light", Font.PLAIN, 15));
fieldADE.setBounds(375, 30, 30, 22);
panChoix.add(fieldADE);
JSpinner compADE = new JSpinner();
compADE.setFont(new Font("Calibri Light", Font.PLAIN, 15));
compADE.setBounds(425, 30, 30, 22);
panChoix.add(compADE);
JLabel labFieldLIN = new JLabel("FIELD");
labFieldLIN.setFont(new Font("Calibri Light", Font.PLAIN, 10));
labFieldLIN.setBounds(15, 50, 30, 16);
panChoix.add(labFieldLIN);
JLabel labCompLIN = new JLabel("COMPOSITE");
labCompLIN.setFont(new Font("Calibri Light", Font.PLAIN, 10));
labCompLIN.setBounds(51, 50, 58, 16);
panChoix.add(labCompLIN);
JLabel labFieldMH = new JLabel("FIELD");
labFieldMH.setFont(new Font("Calibri Light", Font.PLAIN, 10));
labFieldMH.setBounds(197, 50, 30, 16);
panChoix.add(labFieldMH);
JLabel labFieldADE = new JLabel("FIELD");
labFieldADE.setFont(new Font("Calibri Light", Font.PLAIN, 10));
labFieldADE.setBounds(379, 50, 30, 16);
panChoix.add(labFieldADE);
JLabel labCompMH = new JLabel("COMPOSITE");
labCompMH.setFont(new Font("Calibri Light", Font.PLAIN, 10));
labCompMH.setBounds(235, 50, 58, 16);
panChoix.add(labCompMH);
JLabel labCompADE = new JLabel("COMPOSITE");
labCompADE.setFont(new Font("Calibri Light", Font.PLAIN, 10));
labCompADE.setBounds(416, 50, 58, 16);
panChoix.add(labCompADE);
JButton btnValider = new JButton("Valider");
btnValider.setFont(new Font("Calibri Light", Font.PLAIN, 15));
panFin.add(btnValider);
JButton btnEffacer = new JButton("Effacer");
btnEffacer.setFont(new Font("Calibri Light", Font.PLAIN, 15));
panFin.add(btnEffacer);
JButton btnExporter = new JButton("Exporter");
btnExporter.setFont(new Font("Calibri Light", Font.PLAIN, 15));
panFin.add(btnExporter);
JButton btnAnnuler = new JButton("Annuler");
btnAnnuler.setFont(new Font("Calibri Light", Font.PLAIN, 15));
panFin.add(btnAnnuler);
JTextArea jta = new JTextArea();
jta.setEditable(false);
jta.setFont(new Font("Calibri Light", Font.PLAIN, 15));
jta.setBounds(0, 0, 482, 152);
panText.add(jta);
setVisible(true);
}
} |
Partager