The Way to Programming
The Way to Programming
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.
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.
Sign in to your account