As for the first question, you might find that removing the "sleep" from the loop makes your program, or your database, or some other component, work too hard. But you might also find that every 10 seconds is too infrequent; that would depend on the volatility of the orders and also the requirement to see new orders "instantly".
read up on concurrency and have now implemented ActionListener,
using swing.timer to execute the table update every 3 seconds
this is using the event-dispatch thread and so is safe to use for gui updating.
I think my problem is Solved
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop