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.ButtonGroup;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JButton;
import com.jgoodies.forms.factories.DefaultComponentFactory;
import javax.swing.JRadioButton;
import javax.swing.SwingConstants;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Font;
import javax.swing.border.BevelBorder;
public class JaouaniTchat extends JFrame {
private static final long serialVersionUID = 1L;
private JPanel contentPane;
private JTextField textField;
private JTextField textField_1;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
JaouaniTchat frame = new JaouaniTchat();
frame.setVisible(true);
frame.setTitle( "JaouaniChat Connection window" );
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the frame.
*/
public JaouaniTchat() {
setResizable(false);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 600, 400);
contentPane = new JPanel();
contentPane.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
setContentPane(contentPane);
contentPane.setLayout(null);
setLocationRelativeTo(null);
JLabel lab = new JLabel(new ImageIcon("Jtchat.jpg"));
lab.setBounds(0, 0, 270, 230);
JLabel lblPseudo = new JLabel("Pseudo");
lblPseudo.setForeground(Color.ORANGE);
lblPseudo.setBounds(365, 144, 46, 14);
contentPane.add(lblPseudo);
contentPane.setBackground(new Color(102,153,255));
textField = new JTextField();
textField.setBounds(434, 141, 86, 20);
contentPane.add(textField);
textField.setColumns(10);
JButton btnConnexion = new JButton("Connexion");
btnConnexion.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
// fenetreChat nframe = new fenetreChat();
// nframe.setVisible(true);
}
});
btnConnexion.setForeground(Color.BLUE);
btnConnexion.setBounds(251, 302, 109, 23);
contentPane.add(btnConnexion);
JLabel lblJaouanichatcom = DefaultComponentFactory.getInstance().createTitle("");
lblJaouanichatcom.setIcon(new ImageIcon("C:\\Documents and Settings\\admin\\Mes documents\\cours\\MIAGE\\workspace\\tacos-framework\\src\\Jtchat.JPG"));
lblJaouanichatcom.setHorizontalAlignment(SwingConstants.CENTER);
lblJaouanichatcom.setForeground(Color.ORANGE);
lblJaouanichatcom.setBounds(108, 11, 394, 80);
contentPane.add(lblJaouanichatcom);
JRadioButton rdbtnHomme = new JRadioButton("homme");
rdbtnHomme.setForeground(Color.BLUE);
rdbtnHomme.setBounds(131, 200, 86, 23);
contentPane.add(rdbtnHomme);
rdbtnHomme.setBackground(Color.ORANGE);
JRadioButton rdbtnFemme = new JRadioButton("femme");
rdbtnFemme.setForeground(Color.BLUE);
rdbtnFemme.setBounds(131, 236, 86, 23);
contentPane.add(rdbtnFemme);
rdbtnFemme.setBackground(Color.ORANGE);
ButtonGroup rdbtngpSexe = new ButtonGroup();
rdbtngpSexe.add(rdbtnFemme);
rdbtngpSexe.add(rdbtnHomme);
if(rdbtnFemme.isSelected()){
}
JLabel lblSexe = DefaultComponentFactory.getInstance().createLabel("Sexe :");
lblSexe.setForeground(Color.ORANGE);
lblSexe.setBounds(73, 211, 54, 31);
contentPane.add(lblSexe);
textField_1 = new JTextField();
textField_1.setBounds(438, 216, 46, 20);
contentPane.add(textField_1);
textField_1.setColumns(10);
JLabel lblAge = new JLabel(" Age");
lblAge.setForeground(Color.ORANGE);
lblAge.setBounds(365, 214, 46, 25);
contentPane.add(lblAge);
JLabel lblConnexionSansInscription = new JLabel("CONNEXION SANS INSCRIPTION !");
lblConnexionSansInscription.setForeground(Color.ORANGE);
lblConnexionSansInscription.setFont(new Font("Comic Sans MS", Font.BOLD, 14));
lblConnexionSansInscription.setBounds(10, 135, 270, 29);
contentPane.add(lblConnexionSansInscription);
}
}