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
| package org.swng.test;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.event.*;
import org.dyno.visual.swing.layouts.Constraints;
import org.dyno.visual.swing.layouts.GroupLayout;
import org.dyno.visual.swing.layouts.Leading;
public class Session extends JFrame implements ActionListener {
private static final long serialVersionUID = 1L;
public JLabel jLabel0;
private JTextField jTextField0;
private JButton jButton1;
private JButton jButton0;
private JLabel jLabel2;
private JLabel jLabel3;
private JTextField jTextField2;
private JLabel jLabel1;
private JPasswordField jPasswordField0;
private static final String PREFERRED_LOOK_AND_FEEL = "javax.swing.plaf.metal.MetalLookAndFeel";
public Session() {
initComponents();
}
private JPasswordField getJPasswordField0() {
if (jPasswordField0 == null) {
jPasswordField0 = new JPasswordField();
jPasswordField0.setText("jPasswordField0");
jPasswordField0.setEchoChar('');
}
return jPasswordField0;
}
private JLabel getJLabel1() {
if (jLabel1 == null) {
jLabel1 = new JLabel();
jLabel1.setText(Mot de passe);
}
return jLabel1;
}
private JTextField getJTextField2() {
if (jTextField2 == null) {
jTextField2 = new JTextField();
}
return jTextField2;
}
private JLabel getJLabel3() {
if (jLabel3 == null) {
jLabel3 = new JLabel();
jLabel3.setText("Num CCP :");
}
return jLabel3;
}
private JButton getJButton0() {
if (jButton0 == null) {
jButton0 = new JButton();
jButton0.setText("Se connecter");
}
return jButton0;
}
private JTextField getJTextField0() {
if (jTextField0 == null) {
jTextField0 = new JTextField();
}
return jTextField0;
}
private JLabel getJLabel0() {
if (jLabel0 == null) {
jLabel0 = new JLabel();
jLabel0.setText("nom utilisateur :");
}
return jLabel0;
}
private static void installLnF() {
try {
String lnfClassname = PREFERRED_LOOK_AND_FEEL;
if (lnfClassname == null)
lnfClassname = UIManager.getCrossPlatformLookAndFeelClassName();
UIManager.setLookAndFeel(lnfClassname);
} catch (Exception e) {
System.err.println("Cannot install " + PREFERRED_LOOK_AND_FEEL
+ " on this platform:" + e.getMessage());
}
}
public static void main(String[] args) {
installLnF();
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
Session frame = new Session();
frame.setDefaultCloseOperation(Session.EXIT_ON_CLOSE);
frame.setTitle("Session");
frame.getContentPane().setPreferredSize(frame.getSize());
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
});
}
{
}
} |
Partager