Egir.dk

Egir.dk Mapping Forum
It is currently Sun Sep 05, 2010 6:55 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: pretty code
PostPosted: Tue Jul 03, 2007 7:12 pm 
Offline
King of all n00bs
User avatar

Joined: Tue Apr 20, 2004 9:02 pm
Posts: 2952
Location: Holstebro, Denmark
Code:
    private void swingRepaint()
    {
   EventQueue.invokeLater(new Runnable() {
      public void run() {
          repaint();
      }
       });
    }

_________________
Image
http://www.hvadsigerhelge.dk/


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 06, 2007 6:06 pm 
Offline
^Mountain Break^
User avatar

Joined: Fri Mar 03, 2006 6:31 pm
Posts: 675
Location: Denmark
Oh yeah that sure is pretty, thanks! (:

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 06, 2007 8:02 pm 
Offline
King of all n00bs
User avatar

Joined: Tue Apr 20, 2004 9:02 pm
Posts: 2952
Location: Holstebro, Denmark
actually it aint. But I dont guess anyone inhere ever codes GUIs in java :)

_________________
Image
http://www.hvadsigerhelge.dk/


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 06, 2007 8:46 pm 
Offline
^Mountain Break^
User avatar

Joined: Fri Mar 03, 2006 6:31 pm
Posts: 675
Location: Denmark
Im just kidding Egir, i dont even know what it is. :erm:

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 06, 2007 8:55 pm 
Offline
Don't I know you ?
User avatar

Joined: Thu Jul 27, 2006 8:54 pm
Posts: 246
Location: im sorry i forgot that :s
nice new avartar/signature you got there :)

_________________
Yellow and red matches good


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 07, 2007 7:30 am 
Offline
Memb0r

Joined: Wed Nov 01, 2006 4:44 pm
Posts: 134
Location: dK
lol prut... completely off topic

egir .. what is it then ??

_________________
--- bangd? ---

http://www.evolution-entertainment.net
http://community.evolution-entertainment.net
http://gignforce989.tk

Link Spam <3


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 09, 2007 2:00 pm 
Offline
King of all n00bs
User avatar

Joined: Tue Apr 20, 2004 9:02 pm
Posts: 2952
Location: Holstebro, Denmark
repaint is a method for telling the screen that it should update an area to reflect changed data. Thats something you want to happen soon after the data has changed. However, many tiny changes in the data can ofcourse still be reflected by a single repaint, so repaints are coalesced with the repaint method. This is called the repaint pattern. So if you call repaint() eight times within a very short timeframe the area is only repainted once. Which is good, as many repaints will take a lot of time and cause lagg, which is not acceptable in normal GUIs.

The above code will ask java to call repaint some time later instead of now, preventing recent repaints to be coalesced since they havent been registered soon enough. This is silly and completly unecessary.

_________________
Image
http://www.hvadsigerhelge.dk/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group