aspose file tools*
The moose likes Applets and the fly likes Re:Integrating applet timer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Re:Integrating applet timer" Watch "Re:Integrating applet timer" New topic
Author

Re:Integrating applet timer

preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Hi,
I have done an applet program which starts time when pressing start button and stops when pressing stop.
I need to implement this in a program which i already had.what that program do is ,when logging into a crm page,a logout button displays on screen.when logging through a softphone,it displays a pause button along with it.after that ,incoming call will come through predictive dialing.At that time some more buttons will be displayed and the (logout and pause)button will be disappeared.Now i want to display a timer in that screen when logging in to the page and the time should stop during the inbound calls.The time should start and stop again like the same continuously.

can i integrate that applet program which shows the time in this program.Is it possible?please help me

Thanks.
[ December 21, 2007: Message edited by: preethi Ayyappan ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41872
    
  63
That's a lot of functionality you're talking about. Assuming all that is part of a Java application (or applet) it should be possible. What are you struggling with specifically?


Ping & DNS - my free Android networking tools app
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Hello,
Thank you for your reply.What i need is ,I want to display the time when a person log into the crm page and it should stop when a call enters into it predictively.The code which i have is an open source.so i dont know where and how to add the timer.The code is too long and i am unable to send that.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41872
    
  63
Without knowing anything about the code you're working with it's hard to advise how to add it. But surely you can find the code that handles the login, and start the timer at that point in time. You'll need to identify a place in the GUI where to display it (if that's what you want to do), and an appropriate class where you can store the time of the login - maybe there's a kind of session object or preferences object for each user; that would be a natural place. Good luck.
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Thanks.I will try to find those places whatever you have mentioned.
:roll:
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Hi,
I want to display the time in this applet program.Here in the below code I've mentioned the place where I am displaying the buttons.Here above the buttons,I have to display the time .How should i add the time in this program?please guide me to do this.


Thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41872
    
  63
I'm not sure what you're asking - recently you were working on an applet that displays a timer. What problem are you facing integrating that code into this applet?
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
You told that i have to find the place where should i display the timer in GUI.I want to display the timer above the buttons.Thats why I am asking How should i add the timer like i added the buttons in the GUI.
.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41872
    
  63
A GridLayout is filled left-to-right, top-to-bottom, so if you want the label that shows the timer to be above the buttons, then you need to add it before those.

But since this is obvious when one tries it, I'm guessing that doesn't answer your question ... ?
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
How do i add an label which displays the timer.Whether i have to use the same code which i used to add the buttons?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41872
    
  63
The other discussion contains code that adds a label with the timer to a GUI. It sounds as if you're asking exactly how to do that. Is this case somehow different? If so, tell us how it differs.
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Thanks for your help.I have tried that timer in javascript which displays the timer in html .I am having another doubt .I had a code to start and stop the timer using separate start and stop buttons.I had a program which is having a pause button.If i click that pause button,It will become unpaused which is being used for callcenter agents.I need to show the time between the gap of pause and unpause .The paused time and unpaused time should be stored in the database.Here I show the code where the pause becomes unpause.
.
How shall i do this with this code?please help me to do this.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41872
    
  63
How is pausing and un-pausing a timer different from stopping and starting it? (Apart from the obvious difference that it wouldn't be reset to zero.)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Re:Integrating applet timer