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; //VS4E -- DO NOT REMOVE THIS LINE! 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 void initComponents() { setTitle("Authentification"); setLayout(new GroupLayout()); add(getJButton1(), new Constraints(new Leading(216, 10, 10), new Leading(181, 10, 10))); add(getJLabel2(), new Constraints(new Leading(62, 10, 10), new Leading(10, 10, 10))); add(getJLabel0(), new Constraints(new Leading(12, 12, 12), new Leading(57, 12, 12))); add(getJTextField2(), new Constraints(new Leading(113, 132, 12, 12), new Leading(91, 24, 12, 12))); add(getJTextField0(), new Constraints(new Leading(111, 136, 12, 12), new Leading(53, 24, 12, 12))); add(getJLabel1(), new Constraints(new Leading(12, 12, 12), new Leading(129, 12, 12))); add(getJLabel3(), new Constraints(new Leading(12, 74, 12, 12), new Leading(95, 12, 12))); add(getJPasswordField0(), new Constraints(new Leading(111, 136, 12, 12), new Leading(129, 23, 10, 10))); add(getJButton0(), new Constraints(new Leading(94, 12, 12), new Leading(181, 12, 12))); setSize(320, 240); } 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 JLabel getJLabel2() { if (jLabel2 == null) { jLabel2 = new JLabel(); jLabel2.setText("Bienvenue cher client"); } return jLabel2; } private JButton getJButton0() { if (jButton0 == null) { jButton0 = new JButton(); jButton0.setText("Se connecter"); } return jButton0; } private JButton getJButton1() { if (jButton1 == null) { jButton1 = new JButton(); jButton1.setText("annuler"); } return jButton1; } 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()); } } /** * Main entry of the class. * Note: This class is only created so that you can easily preview the result at runtime. * It is not expected to be managed by the designer. * You can modify it as you like. */ 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); } }); } { } }