Results 1 to 11 of 11
Thread: Urgent Help Needed
- 07-02-2009, 03:31 PM #1Member
- Join Date
- Jun 2009
- Rep Power
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?
- 07-02-2009, 04:07 PM #2
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.
Last edited by tim; 07-03-2009 at 09:12 AM. Reason: Code removedEyes dwelling into the past are blind to what lies in the future. Step carefully.
- 07-03-2009, 04:11 AM #3
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.
- 07-03-2009, 04:27 AM #5
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.
- 07-03-2009, 07:48 AM #8
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. ;)
- 07-03-2009, 08:04 AM #9
Doesn't Mods have the power to change/edit the title?USE CODE TAGS--> [CODE]...[/CODE]
Get NotePad++ (free)
- 07-03-2009, 09:17 AM #10
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. ;)
Anyways, sorry.Eyes dwelling into the past are blind to what lies in the future. Step carefully.
- 07-03-2009, 02:42 PM #11
- By mlwong in forum New To JavaReplies: 0Last Post: 03-19-2009, 09:51 AM
- By pankbiet in forum New To JavaReplies: 6Last Post: 02-17-2009, 10:24 AM
- By msciriha in forum NetBeansReplies: 1Last Post: 02-07-2009, 07:16 PM
- By Manfizy in forum NetBeansReplies: 5Last Post: 01-28-2009, 08:38 AM
- By dirtycash in forum New To JavaReplies: 2Last Post: 11-23-2007, 12:24 PM