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
|
public class PanelLabel extends JPanel
{
private JTextField champDeSaisie;
private JLabel labelResult1;
private JLabel labelResult2;
private JLabel labelResult3;
private JLabel labelResult4;
private JLabel labelResult5;
private JLabel labelResult6;
public PanelLabel ()
{
this.setLayout (new GridLayout (0, 1));
this.champDeSaisie = new JTextField (25);
this.labelResult1 = new JLabel ("");
this.labelResult2 = new JLabel ("");
this.labelResult3 = new JLabel ("");
this.labelResult4 = new JLabel ("");
this.labelResult5 = new JLabel ("");
this.labelResult6 = new JLabel ("");
this.add (this.champDeSaisie);
this.add (this.labelResult1);
this.add (this.labelResult2);
this.add (this.labelResult3);
this.add (this.labelResult4);
this.add (this.labelResult5);
this.add (this.labelResult6);
Tools.faitBordureEtTexte (this.champDeSaisie, "Nombre à convertir", Color.green);
Tools.faitBordureEtTexte (this.labelResult1, "Résultat de la conversion 1", Color.blue);
Tools.faitBordureEtTexte (this.labelResult2, "Résultat de la conversion 2", Color.blue);
Tools.faitBordureEtTexte (this.labelResult3, "Résultat de la conversion 3", Color.blue);
Tools.faitBordureEtTexte (this.labelResult4, "Résultat de la conversion 4", Color.blue);
Tools.faitBordureEtTexte (this.labelResult5, "Résultat de la conversion 5", Color.blue);
Tools.faitBordureEtTexte (this.labelResult6, "Résultat de la conversion 6", Color.blue);
}
public JLabel getLabelResult1 ()
{
return this.labelResult1;
}
public JLabel getLabelResult2 ()
{
return this.labelResult2;
}
public JLabel getLabelResult3 ()
{
return this.labelResult3;
}
public JLabel getLabelResult4 ()
{
return this.labelResult4;
}
public JLabel getLabelResult5 ()
{
return this.labelResult5;
}
public JLabel getLabelResult6 ()
{
return this.labelResult6;
}
public JTextField getChampDeSaisie ()
{
return this.champDeSaisie;
}
} |
Partager