Computer Science Canada Java and Graphics... update screen... |
Author: | Homer_simpson [ Tue Feb 17, 2004 5:45 pm ] | ||
Post subject: | Java and Graphics... update screen... | ||
let's say i gots this:
got my gui window setup and everything but when i draw stuffs on the page... in this case a line...it doesn't update the screen so i can delete that and draw again... now i'm wondering if there is a command like View.Update in turing for java? |
Author: | Homer_simpson [ Wed Feb 18, 2004 10:52 am ] |
Post subject: | |
basically all i need is an equivalent for View.Update for java! ![]() |
Author: | Dan [ Wed Feb 18, 2004 11:29 am ] |
Post subject: | |
i know there is one in the java 2d api, i will check when i get home on how to use it.... |
Author: | Homer_simpson [ Wed Feb 18, 2004 5:33 pm ] |
Post subject: | |
awesome! |
Author: | rizzix [ Fri Feb 20, 2004 5:55 pm ] | ||
Post subject: | |||
extending my previous example.. (once again)
|
Author: | Homer_simpson [ Sun Feb 22, 2004 7:19 pm ] |
Post subject: | |
ummm... dude... how do i run a program that doesn't have a main method :S |
Author: | rizzix [ Mon Feb 23, 2004 3:45 pm ] | ||
Post subject: | |||
|
Author: | Homer_simpson [ Tue Feb 24, 2004 6:01 pm ] |
Post subject: | |
makes me feel such a noobie at this... ![]() |
Author: | rizzix [ Tue Feb 24, 2004 11:25 pm ] | ||||
Post subject: | |||||
yea, it might take awhile to get used to. u basically need to think Objects heh. anyways.. the DrawView class i wrote above is basically this: i create an image (its better if you use a BufferedImage.. but Image will do) now i do all my drawing onto this image. when i need to update the screen, i just load the image on to the screen. to make this process simpler i wrote this: http://www.compsci.ca/v2/viewtopic.php?t=3817 try it out.. i've wraped a turing like syntax over the java methods.. so it should be easier to concentrate on drawing than the actual process of buffering etc.. here's an example using that class:
and here's the application class:
|