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 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
|
import java.awt.BorderLayout;
import java.awt.LayoutManager;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JSeparator;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit <a href="http://www.cloudgarden.com" target="_blank">www.cloudgarden.com</a> for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class ClientInt extends javax.swing.JFrame {
/**
*
*/
private static final long serialVersionUID = 1L;
private JPanel jPanel1;
private JTextArea jTextArea1;
private JLabel jLabel1;
private JLabel jLabel4;
private JLabel jLabel6;
private JLabel jLabel5;
private JLabel jLabel3;
public static JTextField jTextField2;
public JLabel jLabel2;
private JButton jButton1;
private JTextField jTextField1;
private String hour;
public String couocu=null;
/**
* Auto-generated main method to display this JFrame
*/
public static void main(String[] args) {
ClientInt inst = new ClientInt();
inst.setVisible(true);
}
public ClientInt() {
super();
initGUI();
}
private void initGUI() {
String msg = "";
Message ms=new Message("momo",msg);
try {
{
jPanel1 = new JPanel();
getContentPane().add(jPanel1, BorderLayout.CENTER);
LayoutManager jPanel1Layout = null;
jPanel1.setLayout(jPanel1Layout);
jPanel1.setPreferredSize(new java.awt.Dimension(392, 441));
jPanel1.setLayout(null);
{
jTextArea1 = new JTextArea();
//ChatClient Client=new ChatClient("momo","url");
jPanel1.add(jTextArea1);
//jTextArea1.setText(""+ Client.diffuseMessage(ms)/*+jTextField1.getText()*/);
jTextArea1.setBounds(14, 42, 364, 315);
}
{
jButton1 = new JButton();
jPanel1.add(jButton1);
jButton1.setText("Submit");
jButton1.setBounds(147, 392, 84, 28);
}
{
jTextField1 = new JTextField();
jPanel1.add(jTextField1);
jTextField1.setText("");
msg=jTextField1.getText();
jTextField1.setBounds(14, 364, 364, 21);
}
{
jLabel1 = new JLabel();
jPanel1.add(jLabel1);
jLabel1.setText("Heure Serveur:");
jLabel1.setBounds(168, 0, 77, 21);
{
jLabel4 = new JLabel();
jLabel1.add(jLabel4);
jLabel4.setText("Heure Client");
jLabel4.setBounds(28, 14, 63, 28);
}
}
{
//H=new ex2.HeureServeur();
jLabel2 = new JLabel();
jPanel1.add(jLabel2);
jLabel2.setText("");
jLabel2.setBounds(252, 0, 35, 21);
}
{
jTextField2 = new JTextField();
jPanel1.add(jTextField2);
jTextField2.setBounds(49, 7, 105, 21);
//couocu=jTextField2.getText();
jTextField2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
//System.out.println("jTextField2.actionPerformed, event="+evt);
//jTextField2.setText("");
if(evt.getSource()==jTextField2)
jTextField2.getText();
}
});
}
{
jLabel3 = new JLabel();
jPanel1.add(jLabel3);
jLabel3.setText("Pseudo");
jLabel3.setBounds(7, 7, 35, 21);
}
{
jLabel5 = new JLabel();
jPanel1.add(jLabel5);
jLabel5.setText("HeureClient:");
jLabel5.setBounds(168, 14, 63, 21);
}
{
jLabel6 = new JLabel();
jPanel1.add(jLabel6);
//hour=(String)System.currentTimeMillis();
jLabel6.setText("");
jLabel6.setBounds(238, 14, 42, 21);
}
}
this.setSize(400, 450);
} catch (Exception e) {
e.printStackTrace();
}
}
} |
Partager