Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Cear screen
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
xX_MayDay_Xx




PostPosted: Fri May 05, 2006 8:08 am   Post subject: Cear screen

ok i am attempting to make a game of chess in java, i am just in the beginning stages of it and i was wonedring if there was anyway to clear the screen........like in Turing you put "cls" to clear....what is it in java?
Sponsor
Sponsor
Sponsor
sponsor
codemage




PostPosted: Fri May 05, 2006 8:40 am   Post subject: (No subject)

clear();
cool dude




PostPosted: Fri May 05, 2006 5:33 pm   Post subject: (No subject)

r u sure thats the command because it doesn't work for me. Confused i get an error saying cannot resolve symbol - method clear()
wtd




PostPosted: Fri May 05, 2006 5:36 pm   Post subject: (No subject)

In what context did you call it?

I suspect this is a method in some HSA specific class.
cool dude




PostPosted: Fri May 05, 2006 6:36 pm   Post subject: (No subject)

wtd wrote:
In what context did you call it?

I suspect this is a method in some HSA specific class.


not sure. how am i supposed to call it?
wtd




PostPosted: Fri May 05, 2006 6:39 pm   Post subject: (No subject)

I'm not familiar with the Holt classes.
[Gandalf]




PostPosted: Fri May 05, 2006 11:53 pm   Post subject: (No subject)

If you are not using the HSA classes, you have three options that I know of:
1. Fill the screen with a large filled in box of your background colour.
2. Just repaint() the applet (or whatever it is you're using), this will call the update() method which clears the screen for you.
3. If you are using double buffering you just free the previous frame's image and redraw the new one.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: