Article View: borland.public.jbuilder.java.swing
Article #11276Re: OnSelChanging equivalent
From: Omer Azhar Qureshi
Date: Thu, 24 Jun 1999 00:00
Date: Thu, 24 Jun 1999 00:00
48 lines
1615 bytes
1615 bytes
Chris,
i needed to do the same & this is how i managed....
iSelectedTab is a class memnber & an int intialized to the index of the tab
initially selected....
void myTabbedPane_stateChanged(ChangeEvent e)
{
switch (this.iSelectedTab)
{
case 0:
if (YOUR_CONDITION_FOR_FAILOUR)
{
SHOW_MESSAGE_BOX
this.myTabbedPane.setSelectedIndex (0);
return;
}
break;
case 1:
if (YOUR_CONDITION_FOR_FAILOUR)
{
SHOW_MESSAGE_BOX
this.myTabbedPane.setSelectedIndex (1);
return;
}
break;
case 2:
if (YOUR_CONDITION_FOR_FAILOUR)
{
SHOW_MESSAGE_BOX
this.myTabbedPane.setSelectedIndex (2);
return;
}
break;
}
this.iSelectedTab = this.myTabbedPane.getSelectedIndex ();
}
hope this helps
regards
Oaq
Technical Details
Message-ID:
<7kt1bd$ckt1@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3771791D.CCCC91EC@pebio.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,93371642ade28bb2 X-Google-Attributes: gid111d45,public From: "Omer Azhar Qureshi" <oaq@systemsltd.com.pk> Subject: Re: OnSelChanging equivalent Date: 1999/06/24 Message-ID: <7kt1bd$ckt1@forums.borland.com> X-Deja-AN: 493311211 References: <3771791D.CCCC91EC@pebio.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Newsgroups: borland.public.jbuilder.java.swing