• Java – Deleting items from combobox bound with database

    RenaldoL25 Member

    I want to remove the selected item from the combobox. The combobox is
    bound to database. Can you please help me, as soon as possible. Thanks.

  • Amit Member

    We are willing to help, but it is impossible with the information you provided… Which database? Is there some code you can show us, on how you build the program? We can’t help you otherwise.

  • SapnaVishwas Member
    long startMillis = System.currentTimeMillis();
    
    while(true)
    {
        long diff = System.currentTimeMillis() - startMillis;
        if( diff > 1000)
       {
            //Here goes your database code
           
             //When done, set the new millis value
             startMillis = System.currentTimeMillis();
        }
    }
    

    This should not be used, as this continuously executes the while loop, so it leaves no threads (or better, CPU capacity) for other running programs and services.
    I’ve posted it, because it show how NOT to do things, but also how it CAN be done, but only if there’s no way around.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.
en_USEnglish