🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.java
Article #17786

Como JRadioButtons y GroupButtons

#17786
From: Dionisio Barrantes
Date: Wed, 18 Oct 2000 22:28
16 lines
1312 bytes
He creado con un bucle unos cuantos JRadioButtons cada uno con su texto.
 y los he a�adido a un grupo.

 for (int i=0; i<16; i++) {
      JRadioButton option = new JRadioButton("Boton " + i + "
Button",false);
      group.add (option);
       }

Pero ahora no se como recuperar el JRadioButton seleccionado y desencadenar
una accion por que todos se llaman option (de momento mostrar  un texto con
su indice, esto es, si el boton pulsado es el 3 o el 5).

�Alguien puede echarme un mano?.

Saludos Dionisio.
Technical Details
Message-ID: <8sl82s$4oh$1@diana.bcn.ttd.net>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news.tele.dk!130.133.1.3!fu-berlin.de!newsfeed.bcn.ttd.net!news.bcn.ttd.net!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: 1116f3,7b976cfb12351069,start
X-Google-Attributes: gid1116f3,public
X-Google-ArrivalTime: 2000-10-18 15:29:07 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news.tele.dk!130.133.1.3!fu-berlin.de!newsfeed.bcn.ttd.net!news.bcn.ttd.net!not-for-mail
From: "Dionisio Barrantes" <barrante@teleline.es>
Newsgroups: es.comp.lenguajes.java
Subject: Como JRadioButtons y GroupButtons
Date: Thu, 19 Oct 2000 00:28:42 +0200
Organization: Telefonica Transmision de Datos
Lines: 18
Message-ID: <8sl82s$4oh$1@diana.bcn.ttd.net>
NNTP-Posting-Host: 193.153.90.252
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200