User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 397,768 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,450 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 4082 | Replies: 1
Reply
Join Date: Nov 2004
Posts: 3
Reputation: vrc_sekhar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
vrc_sekhar vrc_sekhar is offline Offline
Newbie Poster

Help paint() in java awt

  #1  
Nov 26th, 2004
hello everybody,
ive devoloped an awt application in java, i want to call the paint() for drawing sytem time on a image through Graphics.drawString(String,int,int);
now i want to refresh the time for each second by calling repaint(), but whats my problem is, each time i call repaint() the image i drawn using the paint() is being repainted. so i want to overload the paint() so that each time the image is not repainted.
please anyone help me in this.
thnx n regards.
ravi.v
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2004
Posts: 10
Reputation: mcclth is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
mcclth mcclth is offline Offline
Newbie Poster

Re: paint() in java awt

  #2  
Nov 28th, 2004
try this:
public void update (Graphics page)
{
paint(page);
}
That way, instead of updating the whole page (which erases first), it just draws to it.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Java Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Java Forum

All times are GMT -4. The time now is 4:17 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC