Scott MacMaster
September 26th, 1999, 07:04 PM
I working on writing a java applet with a drop down control. I what the item to be links. Either to a webpage or a mailto link. This is the code I have to detect a click but I don't know how to make the link happen.
public boolean action(Event evt, Object arg)
{
if(evt.target instanceof Choice)
{
int index = c.getSelectedIndex();
if(index == 0)
{
}
else if(index == 1)
{
}
else if(index == 2)
{
}
else if(index == 3)
{
}
return true;
}
else
{
return false;
}
}
Does anyone know how to do this?
Thanks,
Scott
Give a man a fish and feed him for a day,
Teach a man to fish and feed him for life.
_______________________________________________________
<A HREF="http://welcome.to/scottweb">http://welcome.to/scottweb</A> - The Ultimate Programmers Reference
public boolean action(Event evt, Object arg)
{
if(evt.target instanceof Choice)
{
int index = c.getSelectedIndex();
if(index == 0)
{
}
else if(index == 1)
{
}
else if(index == 2)
{
}
else if(index == 3)
{
}
return true;
}
else
{
return false;
}
}
Does anyone know how to do this?
Thanks,
Scott
Give a man a fish and feed him for a day,
Teach a man to fish and feed him for life.
_______________________________________________________
<A HREF="http://welcome.to/scottweb">http://welcome.to/scottweb</A> - The Ultimate Programmers Reference