Bonjour a tous !
Voila j'ai quelques problemes avec mon applet Java.
je voudrais faire un applet simple :
afficher deux bouton radion et un bouton normal.
lorsque l'on clique sur le bouton normal je voudrais qu'il m'affiche
l'etat du bouton radio n�1.
J'ai creer cet Applet avec VisualCafe 3.0 mais le probleme c'est qu'il
peut me creer les deux bouton radio ainsi que le bouton normal mais tous
ce qui de les faire interagir entre eux et de m'afficher l'etat du
bouton radion 1 lorsque je clique sur le bouton normal il ne peut pas le
faire , ou alors je ne sais pas comment faire !!
Si quelqu'un peut m'aider a resoudre ce probleme ou bien me donner un
Applet qui fasse ceci , il serait le bien venu !
Merci !!



/*
A basic extension of the com.sun.java.swing.JApplet class
*/

import com.sun.java.swing.*;
import java.awt.*;
import symantec.itools.awt.RadioButtonGroupPanel;

public class JApplet1 extends JApplet implements Runnable {

    Thread runner;

 public void init()
 {
  // Take out this line if you don't use symantec.itools.net.RelativeURL
or symantec.itools.awt.util.StatusScroller
  symantec.itools.lang.Context.setApplet(this);

  // This line prevents the "Swing: checked access to system event
queue" message seen in some browsers.
  getRootPane().putClientProperty("defeatSystemEventQueueCheck",
Boolean.TRUE);

  // This code is automatically generated by Visual Cafe when you add
  // components to the visual environment. It instantiates and
initializes
  // the components. To modify the code, only use code syntax that
matches
  // what Visual Cafe can generate, or Visual Cafe may be unable to back

  // parse your Java file into its visual environment.
  //{{INIT_CONTROLS
  getContentPane().setLayout(null);
  getContentPane().setBackground(java.awt.Color.white);
  getContentPane().setForeground(java.awt.Color.black);
  setSize(426,266);
  radioButtonGroupPanel1.setLayout(null);
  getContentPane().add(radioButtonGroupPanel1);
  radioButtonGroupPanel1.setBackground(java.awt.Color.lightGray);
  radioButtonGroupPanel1.setBounds(108,12,221,127);
  radioButton1.setCheckboxGroup(Group1);
  radioButton1.setLabel("Consultation � distance");
  radioButtonGroupPanel1.add(radioButton1);
  radioButton1.setBounds(8,10,168,42);
  radioButton2.setCheckboxGroup(Group1);
  radioButton2.setState(true);
  radioButton2.setLabel("Consultation locale");
  radioButtonGroupPanel1.add(radioButton2);
  radioButton2.setBounds(8,70,156,42);
  button1.setLabel("Cliquer ici pour valider");
  getContentPane().add(button1);
  button1.setBackground(java.awt.Color.lightGray);
  button1.setBounds(72,180,289,25);
  //}}
 }

 //{{DECLARE_CONTROLS
 symantec.itools.awt.RadioButtonGroupPanel radioButtonGroupPanel1 = new
symantec.itools.awt.RadioButtonGroupPanel();
 java.awt.Checkbox radioButton1 = new java.awt.Checkbox();
 java.awt.CheckboxGroup Group1 = new java.awt.CheckboxGroup();
 java.awt.Checkbox radioButton2 = new java.awt.Checkbox();
 java.awt.Button button1 = new java.awt.Button();
 //}}

 public void start() {
     if (runner==null) {
         runner = new Thread(this);
         runner.start();
     }
 }

 public void stop() {
     runner = null;
 }

 public void run() {
     Thread thisThread = Thread.currentThread();
     while (runner == thisThread) {
         repaint();
         try {
             Thread.sleep(100);
         }catch (InterruptedExeption e) { }
     }
 }

  public void paint(Graphics screen) {
         screen.drawstring(getstate(radiobutton1), 10, 50);
  }
}




}


___________________________________________________________________
Un achat en vue? A un prix imbattable? Toutes les caract�ristiques
de tous les produits!  =>   http://www.cyber-pc.com/ldlc.html    <=
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cyber PC, la Mailing List du PC! Abonnement / D�sabonnement GRATUIT
--{ mailto:[EMAIL PROTECTED] }----{ http://www.cyber-pc.com }----

Répondre à