File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes dynamic data : refresh screen Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "dynamic data : refresh screen" Watch "dynamic data : refresh screen" New topic
Author

dynamic data : refresh screen

achana chan
Ranch Hand

Joined: Jul 29, 2002
Posts: 277
Hi.
I need to know how to approach this problem and what I need to read up on.
I have servlets on TC4 which retrieve data from Oracle.
The servlets do something to the data and "send" them back to the applet. The applet (awt) displays the result on the client's screen.
However, it turns out some data is quasi-dynamic, it can change during the day, but not often.
What are some of the ways to refresh the screen when the data changes?
Hopefully it won't be a major modification!
TIA :-)


humanum errare est.
Tamizh Selvan
Greenhorn

Joined: Oct 10, 2003
Posts: 15
u can call repaint() method or revalidate() method to refresh ur applet. if ur applet has to be repainted more often, override the update(Graphics g) method of ur applet.
hope this help u
Marcus


"No one knows what one can do until one tries"<br />-John Kingsley.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Sounds like you'd be needing a way for the server to "push" changes to the applet. You might open a socket. The server would have to keep track of the sockets for all the available clients. If the applet is a socket server, the real server can open a connection to a client any time it needs one, and need not hold an open connection all the time. A vendor product I'm using at work does this for workfow. It keeps the address and port of every client in a database, then opens a connection to the client to push work. Is that something you could use?


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dynamic data : refresh screen
 
Similar Threads
PC display problem
JTable is not getting refreshed.
Retaining browser scrollbar position after page reloading
applets - urgent !
How to Refresh ListView in Android