The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
June 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

combobox

Posted by Ethsham Arshad on January 09, 2002 at 11:37 AM

Hi !!!

I have a problem !
Below is a method that will put url address in a combobox but
if an address is already in the combobox, it will put it in again.
So the combobox will have two addresses that r the same
how do i solve this problem.

protected void SiteInserter()
{
urlCombo.insertItemAt(urlCombo.getSelectedItem(),0);
try
{
URL url = new URL((String)urlCombo.getSelectedItem());
browser.setPage(url);

}
catch(java.io.IOException e)
{
}
}





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us