You can always spawn off a second thread from your main thread. One way to do this is to have your application's class implement the Runnable interface, then from your main thread issue:
Thread t = new Thread(this); t.start(); This will start your second thread running in Runnable's public void run() method which you'd need to implement. -----Original Message----- From: Steven [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 6:10 PM To: JDJList Subject: [jdjlist] Re: Thread.sleep problem...Please help Hi, Thanks for ur opinion. But what if my application has only single thread? are there any alternatives? ----- Original Message ----- From: "Hema Venkataraman" <[EMAIL PROTECTED]> To: "JDJList" <[EMAIL PROTECTED]> Sent: Friday, April 05, 2002 12:42 PM Subject: [jdjlist] Re: Thread.sleep problem...Please help > You have a thread for a COM port which will be listening for events. You > have another Thread to do the actions to be done. Make them sleep for few > seconds. You can also use wait and notify in case actions are to be taken > when a particular event happens. > > > > > To change your membership options, refer to: > http://www.sys-con.com/java/list.cfm To change your membership options, refer to: http://www.sys-con.com/java/list.cfm To change your membership options, refer to: http://www.sys-con.com/java/list.cfm
