Article View: borland.public.jbuilder.java.language
Article #16921Re: how to use timer
From: Chris Hill
Date: Mon, 04 Jan 1999 00:00
Date: Mon, 04 Jan 1999 00:00
31 lines
1398 bytes
1398 bytes
Borland has provided some Timer functionality with the borland.jbcl.util.Timer class and the borland.jbcl.util.TimerClient interface. Implement TimerClient in one of your classes (if you implement it in a frame, it will be similar to C++ Builder where you implement the timer event handler in your form's code). Next create a Timer instance and call the startTimer function. Later you can call the stopTimer if you wish. If you have a problem using Borland classes, you could use javax.swing.Timer from JDK 1.2 or create your own class using Threads. The basic idea is to spawn a new thread which sleeps for the period of the timer then fires and event. On Mon, 04 Jan 1999 13:03:37 +0200, Ofir Amitai <amitay@econ.haifa.ac.il> wrote: >Hi > >I need to use timer to execute a command in equal intervals >in CBuilder I use the Timer component, what do I do in JBuilder ? > >Regrads >Ofir Amitai > Chris Hill Chris244@aol.com
Technical Details
Message-ID:
<3690c60f.318105441@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3690A008.C802EE4D@econ.haifa.ac.il>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,2f6728999b8f4dca X-Google-Attributes: gidf74b3,public From: Chris244@aol.com (Chris Hill) Subject: Re: how to use timer Date: 1999/01/04 Message-ID: <3690c60f.318105441@forums.borland.com> X-Deja-AN: 428631790 References: <3690A008.C802EE4D@econ.haifa.ac.il> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.language