T
tuurbo46
Hi
Im currently im in a bit of a corner. I am able to put data in a
hashtable, but now im in a muddle getting the data out.
How do i change the below method to retrive the data without using the
string?
// declared at top of source file
private TextField userName = new
TextField("Name:.","",20,TextField.ANY);
private TextField userNumber = new
TextField("Number:.","",20,TextField.ANY);
//Declaration of hashtable
Hashtable hT = new Hashtable(5);
//method in code
public void View()
{
Enumeration e1=hT.keys();
while(e1.hasMoreElements())
{
userName=(String)e1.nextElement();
userNumber=(String)hT.get(userName);
display.setCurrent(userNumber);
}
}
Im currently im in a bit of a corner. I am able to put data in a
hashtable, but now im in a muddle getting the data out.
How do i change the below method to retrive the data without using the
string?
// declared at top of source file
private TextField userName = new
TextField("Name:.","",20,TextField.ANY);
private TextField userNumber = new
TextField("Number:.","",20,TextField.ANY);
//Declaration of hashtable
Hashtable hT = new Hashtable(5);
//method in code
public void View()
{
Enumeration e1=hT.keys();
while(e1.hasMoreElements())
{
userName=(String)e1.nextElement();
userNumber=(String)hT.get(userName);
display.setCurrent(userNumber);
}
}