🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #9593

JOptionPane problem (Need Help)

#9593
From: Tal Olier
Date: Fri, 03 Mar 2000 00:00
26 lines
1273 bytes
Hi,
I'm trying a to build a new Java application, and in this application I have
a class that handle events (which implements ActionListener).
After I check the getActionCommand() I would like to open a list box with
options that the user would choose from.

As I understood I should do it with the following:

String s = (String)JOptionPane.showInputDialog(
          null,
          "I am the title",
          JOptionPane.QUESTION_MESSAGE,
          null,
          selVal,
          selVal[3]
        );

My problem is that the variable s holds a string value of the option choosen
by the user and I need the index of the option in the selVal array.

Does anyone have any idea how ?


    Thanks,

            Tal Olier ( mailto:tal_o@rad.co.il )
Technical Details
Message-ID: <89o2g0$pio3@bornews.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,230dd878f092e604,start
X-Google-Attributes: gid111d45,public
From: "Tal Olier" <tal_o@rad.co.il>
Subject: JOptionPane problem (Need Help)
Date: 2000/03/03
Message-ID: <89o2g0$pio3@bornews.borland.com>
X-Deja-AN: 592604964
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.swing