@@ -0,0 +1,1388 @@
+package tp4_reseau;%0A%0Aimport java.awt.BorderLayout;%0Aimport java.awt.Container;%0Aimport java.awt.event.ActionListener;%0Aimport java.awt.event.KeyListener;%0Aimport java.awt.event.WindowListener;%0Aimport java.io.IOException;%0A%0Aimport javax.swing.JFrame;%0Aimport javax.swing.JScrollPane;%0Aimport javax.swing.JTextArea;%0Aimport javax.swing.JTextField;%0A%0Apublic class FenetreChat extends JFrame %7B%0A%0A%09private JTextArea zoneDiscussion;%0A%09private JTextField champEnvoi;%0A%0A%09public FenetreChat(String titre) throws IOException %7B%0A%0A%09%09super(titre);%0A%0A%09%09setBounds(600, 300, 400, 400);%0A%0A%09%09Container conteneur = getContentPane();%0A%09%09conteneur.setLayout(new BorderLayout(20, 20));%0A%0A%09%09zoneDiscussion = new JTextArea();%0A%09%09conteneur.add(zoneDiscussion, BorderLayout.CENTER);%0A%0A%09%09JScrollPane barreDefilement = new JScrollPane(zoneDiscussion);%0A%09%09conteneur.add(barreDefilement);%0A%0A%09%09zoneDiscussion.setEditable(false);%0A%0A%09%09champEnvoi = new JTextField();%0A%09%09conteneur.add(champEnvoi, BorderLayout.SOUTH);%0A%0A%09%09setVisible(true);%0A%0A%09%7D%0A%0A%09public void afficherMessage(String msg) %7B%0A%09%09zoneDiscussion.append(msg + %22%5Cn%22);%0A%09%7D%0A%0A%09public void effacerChampEnvoi() %7B%0A%09%09champEnvoi.setText(%22%22);%0A%09%7D%0A%0A%09public String getMessage() %7B%0A%09%09return champEnvoi.getText();%0A%09%7D%0A%0A%09public void capturerEntree(KeyListener listener) %7B%0A%09%09champEnvoi.addKeyListener(listener);%0A%09%7D%0A%09%0A%09public void gererFermeture(WindowListener listener) %7B%0A%09%09addWindowListener(listener);%0A%09%7D%0A%0A%7D%0A

Create FenetreChat.java