import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.util.Vector; import javax.swing.Icon; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * Tranche.java * * Created on 6 avr. 2009, 13:32:24 */ /** * * @author HEDAHDIA */ public class Tranche extends java.applet.Applet { private Icon defaultIcon; private Icon DisabledIcon; /** Initializes the applet Tranche */ public void init() { try { java.awt.EventQueue.invokeAndWait(new Runnable() { public void run() { initComponents(); } }); } catch (Exception ex) { ex.printStackTrace(); } } /** This method is called from within the init() method to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // //GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); jSeparator1 = new javax.swing.JSeparator(); jButton2 = new javax.swing.JButton(); jSeparator2 = new javax.swing.JSeparator(); jButton3 = new javax.swing.JButton(); jPanel3 = new javax.swing.JPanel(); jRadioButton6 = new javax.swing.JRadioButton(); jRadioButton7 = new javax.swing.JRadioButton(); jRadioButton8 = new javax.swing.JRadioButton(); jTabbedPane1 = new javax.swing.JTabbedPane(); jPanel6 = new javax.swing.JPanel(); jPanel5 = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jRadioButton1 = new javax.swing.JRadioButton(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jPanel4 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jRadioButton2 = new javax.swing.JRadioButton(); jRadioButton3 = new javax.swing.JRadioButton(); jRadioButton4 = new javax.swing.JRadioButton(); jRadioButton5 = new javax.swing.JRadioButton(); setLayout(new java.awt.BorderLayout()); jPanel1.setBackground(new java.awt.Color(153, 153, 153)); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icontexto-webdev-arrow-right-032x032.png"))); // NOI18N jButton1.setText("Suivant"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL); jButton2.setIcon(new javax.swing.ImageIcon("C:\\Documents and Settings\\HEDAHDIA\\Bureau\\icontexto-webdev-ok-032x032.png")); // NOI18N jButton2.setText("valider"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icontexto-webdev-cancel-032x032.png"))); // NOI18N jButton3.setText("Annuler"); jPanel3.setBackground(new java.awt.Color(153, 153, 153)); jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("LES Etapes de Diagnostic")); jRadioButton6.setBackground(new java.awt.Color(153, 153, 153)); jRadioButton6.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jRadioButton6.setForeground(new java.awt.Color(153, 255, 255)); jRadioButton6.setText("Choix Tranche"); jRadioButton6.setToolTipText("Choix Tranche"); jRadioButton6.setBorder(null); jRadioButton6.setBorderPainted(true); jRadioButton6.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Green.png"))); // NOI18N jRadioButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Orange.png"))); // NOI18N jRadioButton6.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Loop On.png"))); // NOI18N jRadioButton6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButton6ActionPerformed(evt); } }); jRadioButton7.setBackground(new java.awt.Color(153, 153, 153)); jRadioButton7.setText("Choix Systéme"); jRadioButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Orange.png"))); // NOI18N jRadioButton7.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Loop On.png"))); // NOI18N jRadioButton7.setRolloverSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Loop Off.png"))); // NOI18N jRadioButton7.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Loop On.png"))); // NOI18N jRadioButton7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButton7ActionPerformed(evt); } }); jRadioButton8.setBackground(new java.awt.Color(153, 153, 153)); jRadioButton8.setText("Remede"); jRadioButton8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Orange.png"))); // NOI18N jRadioButton8.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Loop On.png"))); // NOI18N jRadioButton8.setRolloverSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Loop Off.png"))); // NOI18N jRadioButton8.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Loop On.png"))); // NOI18N jRadioButton8.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButton8ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addComponent(jRadioButton6)) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addComponent(jRadioButton7)) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addComponent(jRadioButton8))) .addContainerGap(18, Short.MAX_VALUE)) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addComponent(jRadioButton6) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE) .addComponent(jRadioButton7) .addGap(28, 28, 28) .addComponent(jRadioButton8) .addGap(17, 17, 17)) ); jPanel6.setBackground(new java.awt.Color(204, 204, 204)); javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); jPanel6.setLayout(jPanel6Layout); jPanel6Layout.setHorizontalGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 605, Short.MAX_VALUE) ); jPanel6Layout.setVerticalGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 491, Short.MAX_VALUE) ); jTabbedPane1.addTab("Remede", jPanel6); jPanel5.setBackground(new java.awt.Color(204, 204, 204)); javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout.setHorizontalGroup( jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 605, Short.MAX_VALUE) ); jPanel5Layout.setVerticalGroup( jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 491, Short.MAX_VALUE) ); jTabbedPane1.addTab("Système", jPanel5); jPanel2.setBackground(new java.awt.Color(204, 204, 204)); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Tranches")); jPanel2.setAlignmentX(2.0F); jPanel2.setAlignmentY(2.0F); jPanel2.setAutoscrolls(true); jLabel1.setFont(new java.awt.Font("Tahoma", 1, 12)); jLabel1.setText("00-Equipement"); jRadioButton1.setBackground(new java.awt.Color(204, 204, 204)); jRadioButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record Off.png"))); // NOI18N jRadioButton1.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record Off.png"))); // NOI18N jRadioButton1.setRolloverSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record On.png"))); // NOI18N jRadioButton1.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record On.png"))); // NOI18N jRadioButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButton1ActionPerformed(evt); } }); jLabel2.setFont(new java.awt.Font("Tahoma", 1, 12)); jLabel2.setText("30-Groupe03"); jLabel3.setFont(new java.awt.Font("Tahoma", 1, 12)); jLabel3.setText("40-Groupe04"); jLabel4.setFont(new java.awt.Font("Tahoma", 1, 12)); jLabel4.setText("80-PosteHT"); jLabel5.setFont(new java.awt.Font("Tahoma", 1, 12)); jLabel5.setText("90-GenieCivils"); jPanel4.setBackground(new java.awt.Color(204, 204, 204)); jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Description de Tranche")); jTextArea1.setColumns(20); jTextArea1.setRows(5); jScrollPane1.setViewportView(jTextArea1); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 419, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(51, Short.MAX_VALUE)) ); jPanel4Layout.setVerticalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(25, Short.MAX_VALUE)) ); jRadioButton2.setBackground(new java.awt.Color(204, 204, 204)); jRadioButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record Off.png"))); // NOI18N jRadioButton2.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record Off.png"))); // NOI18N jRadioButton2.setRolloverSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record On.png"))); // NOI18N jRadioButton2.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record On.png"))); // NOI18N jRadioButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButton2ActionPerformed(evt); } }); jRadioButton3.setBackground(new java.awt.Color(204, 204, 204)); jRadioButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record Off.png"))); // NOI18N jRadioButton3.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record Off.png"))); // NOI18N jRadioButton3.setRolloverSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record On.png"))); // NOI18N jRadioButton3.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record On.png"))); // NOI18N jRadioButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButton3ActionPerformed(evt); } }); jRadioButton4.setBackground(new java.awt.Color(204, 204, 204)); jRadioButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record Off.png"))); // NOI18N jRadioButton4.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record Off.png"))); // NOI18N jRadioButton4.setRolloverSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record On.png"))); // NOI18N jRadioButton4.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record On.png"))); // NOI18N jRadioButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButton4ActionPerformed(evt); } }); jRadioButton5.setBackground(new java.awt.Color(204, 204, 204)); jRadioButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record Off.png"))); // NOI18N jRadioButton5.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record Off.png"))); // NOI18N jRadioButton5.setRolloverSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record On.png"))); // NOI18N jRadioButton5.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/Knob Record On.png"))); // NOI18N jRadioButton5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButton5ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(63, 63, 63) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jRadioButton2) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jRadioButton3) .addComponent(jRadioButton4) .addComponent(jRadioButton5)) .addGap(147, 147, 147) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2) .addComponent(jLabel1) .addComponent(jLabel3) .addComponent(jLabel4) .addComponent(jLabel5))) .addComponent(jRadioButton1)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(96, 96, 96) .addComponent(jLabel1) .addGap(26, 26, 26) .addComponent(jLabel2) .addGap(26, 26, 26) .addComponent(jLabel3) .addGap(28, 28, 28) .addComponent(jLabel4)) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jRadioButton1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jRadioButton2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jRadioButton3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jRadioButton4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jRadioButton5))) .addGap(27, 27, 27) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5) .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jTabbedPane1.addTab("Tranche", jPanel2); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 659, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(36, 36, 36) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(35, 35, 35) .addComponent(jButton1) .addGap(61, 61, 61))) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 610, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()))) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(30, 30, 30) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 519, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(18, 18, 18) .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(40, 40, 40) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1) .addComponent(jButton2) .addComponent(jButton3))) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 664, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); add(jPanel1, java.awt.BorderLayout.CENTER); }// //GEN-END:initComponents private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jButton1ActionPerformed private void jRadioButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton6ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jRadioButton6ActionPerformed private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed jRadioButton6.setIcon(jRadioButton6.getDisabledIcon()); jRadioButton7.setIcon(jRadioButton7.getSelectedIcon()); }//GEN-LAST:event_jButton2ActionPerformed private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed onSendData("00-Equipement"); }//GEN-LAST:event_jRadioButton1ActionPerformed private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jRadioButton2ActionPerformed private void jRadioButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton3ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jRadioButton3ActionPerformed private void jRadioButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton4ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jRadioButton4ActionPerformed private void jRadioButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton5ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jRadioButton5ActionPerformed private void jRadioButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton7ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jRadioButton7ActionPerformed private void jRadioButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton8ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_jRadioButton8ActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JButton jButton3; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JPanel jPanel3; private javax.swing.JPanel jPanel4; private javax.swing.JPanel jPanel5; private javax.swing.JPanel jPanel6; private javax.swing.JRadioButton jRadioButton1; private javax.swing.JRadioButton jRadioButton2; private javax.swing.JRadioButton jRadioButton3; private javax.swing.JRadioButton jRadioButton4; private javax.swing.JRadioButton jRadioButton5; private javax.swing.JRadioButton jRadioButton6; private javax.swing.JRadioButton jRadioButton7; private javax.swing.JRadioButton jRadioButton8; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JSeparator jSeparator1; private javax.swing.JSeparator jSeparator2; private javax.swing.JTabbedPane jTabbedPane1; private javax.swing.JTextArea jTextArea1; // End of variables declaration//GEN-END:variables //----------------------------------------------------------------------------------------------- private URLConnection getServletConnection() throws MalformedURLException, IOException { // Connection URL urlServlet = new URL("http://localhost:8080/Prototype1/ChargementServlet"); HttpURLConnection con = (HttpURLConnection) urlServlet.openConnection(); // con.setDoInput(true); con.setDoOutput(true); con.setUseCaches(false); con.setRequestMethod("POST"); con.setRequestProperty("Content-Type","application/x-java-serialized-object"); System.out.println("la connixion est établit"); // return con; } /** * Envoi des données de l'applet versla servlet. */ private void onSendData(String input) { try { // // String input = inputField.getText(); // envoi des donnees. URLConnection con = getServletConnection(); OutputStream outstream = con.getOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(outstream); oos.writeObject(input); oos.flush(); oos.close(); // reciption des donnees de la servlet. InputStream instr = con.getInputStream();//???????? // java.io.FileNotFoundException: http://localhost:8086/Prototype1/ChargementServlet // at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1288) // ObjectInputStream inputFromServlet = new ObjectInputStream(instr); // String result = (String) inputFromServlet.readObject(); Vector result = (Vector) inputFromServlet.readObject(); inputFromServlet.close(); instr.close(); // Affichages. jTextArea1.setText(result.toString()); } catch (Exception ex) { ex.printStackTrace(); } } }