Package jaouaniChat

Source Code of jaouaniChat.JaouaniTchatt

package jaouaniChat;

import java.awt.Color;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.Canvas;
import com.jgoodies.forms.factories.DefaultComponentFactory;
import javax.swing.JRadioButton;
import java.awt.Component;
import javax.swing.Box;

public class JaouaniTchatt extends JFrame {

  private static final long serialVersionUID = 1L;
  private JPanel contentPane;
  private JTextField textField;

  /**
   * Launch the application.
   */
  public static void main(String[] args) {
    EventQueue.invokeLater(new Runnable() {
      public void run() {
        try {
          JaouaniTchat frame = new JaouaniTchat();
          frame.setVisible(true);
        } catch (Exception e) {
          e.printStackTrace();
        }
      }
    });
  }

  /**
   * Create the frame.
   */
  public JaouaniTchatt() {
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setBounds(100, 100, 450, 300);
    contentPane = new JPanel();
    contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
    setContentPane(contentPane);
    contentPane.setLayout(null);
   
    JLabel lblPseudo = new JLabel("Pseudo");
    lblPseudo.setBounds(69, 114, 46, 14);
    contentPane.add(lblPseudo);
    contentPane.setBackground(Color.YELLOW);
    textField = new JTextField();
    textField.setBounds(131, 111, 86, 20);
    contentPane.add(textField);
    textField.setColumns(10);
   
    JButton btnConnexion = new JButton("Connexion");
    btnConnexion.setBounds(277, 110, 109, 23);
    contentPane.add(btnConnexion);
   
    Canvas canvas = new Canvas();
    canvas.setBounds(22, 25, 63, 56);
    contentPane.add(canvas);
   
    JLabel lblJaouanichatcom = DefaultComponentFactory.getInstance().createTitle("JaouaniChat.com");
    lblJaouanichatcom.setBounds(174, 11, 200, 50);
    contentPane.add(lblJaouanichatcom);
   
    JRadioButton rdbtnHomme = new JRadioButton("homme");
    rdbtnHomme.setBounds(131, 159, 109, 23);
    contentPane.add(rdbtnHomme);
    rdbtnHomme.setBackground(Color.red);
   
    JRadioButton rdbtnFemme = new JRadioButton("femme");
    rdbtnFemme.setBounds(131, 185, 109, 23);
    contentPane.add(rdbtnFemme);
    rdbtnFemme.setBackground(Color.red);
   
    Component horizontalStrut = Box.createHorizontalStrut(20);
    horizontalStrut.setBounds(76, 25, 298, 58);
    contentPane.add(horizontalStrut);
   
    JLabel lblSexe = DefaultComponentFactory.getInstance().createLabel("Sexe :");
    lblSexe.setBounds(46, 158, 54, 50);
    contentPane.add(lblSexe);
  }
}
TOP

Related Classes of jaouaniChat.JaouaniTchatt

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.