Urgent Help Needed
Hi all I have an assignment due soon and need help with it the spec is below...im doing the assignment using the program BlueJ
To design and implement a program written in the Java Language to produce a system that will run successfully on the Java platform with four command buttons: up, down, left, right and a text window to enter ''n" pixels. These controls will operate a drawing tool composed of a moving GIF image of a pen in the applet window. When, say, the 'up' button is pushed, a line will be slowly drawn n pixels long. Four colour selector buttons additionally allow the drawing line colour to be changed. You will design your program using UML techniques and present full documentation including the Javadoc summary of your coded methods.
Basically Ive done everything in regards to the buttons etc. the only problem is im having trouble making the drawing tool move...
can anyone help?
Hey Cid17 :)
To draw animations on a graphics object using Java API, you need to use threads. It is also recommended to use double buffering to avoid flickering. Here is a applet I made that demonstrates how to do this.
Hope this will be of use and good luck with your assignment. ;)
tim, this is not a good practice. You just write the code for our thread starter and send it here. I don't think you are helping him here in much better way. This way I don't think OP learn something new. Just think about that. I really appreciate your contribution here. :)
I second Eranga. Spoon feeding only teaches the student to ask for more spoon feeds and does not help them learn.
Fubarable, I really hate that title. At least why those members can't use a proper title in there thread. What's your suggestion about that? Or else we can discuss in moderators forum.
I think that all that we can do is suggest that members use more informative titles when posting new threads (as you are doing) and hope that they will listen to the suggestion. I don't think that there is anything else we can do.
Actually Tim's code doesn't follow Cid's assignment specifications at all, which again is good. Cid, please show us your work and ask a specific question, and we'll be glad to help answer as best we can.
I agreed with you. We cannot take a specific action, like close the thread and so on. Anyway, I'll move in the same way.
And also, I'm not criticize the code. As you said it's not the exact code OPs' looking. But the way he present it is not good at all. ;)
Doesn't Mods have the power to change/edit the title?
Learning by example
I would have appreciated an example on animation, preferably different to the problem I would have faced. - That's how I learn best. ;)
Actually there is no direct way to do that.
Originally Posted by angryboy