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

Username:   Password: 
 RegisterRegister   
 Drawing with Frame without using repaint()
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Pickles




PostPosted: Mon May 02, 2005 8:30 pm   Post subject: Drawing with Frame without using repaint()

Is there a way to draw, on the frame without having to call repaint();

Like say I wanted to draw a rectangle when i clicked the mouse, is there away to do that without having the drawRectangle in the paint method, then giving it the right x&y coordinates when clicking? So I could just draw the rectangle without having to redraw the whole screen.

And then if in my paint method I have say g.drawRect(x,y,20,20), and I want to draw a rectangle each time I click, is there a way to do it without making x and y an array in order to keep the old square on the screen?

I think thats about it, i looked through some other threads but couldnt see anything like this, I appologize if I'm blind.
Sponsor
Sponsor
Sponsor
sponsor
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  [ 1 Posts ]
Jump to:   


Style:  
Search: