Here is the story, started learning JAVA 5 days ago for this internship I'm at, my mentor wants me to animate a small part of a project using JAVA. Me being new to the language I have no ideal where to start. I did a couple of searches with Google but most of the tutorials were directed toward 3-d animation and animation using Netbeans IDE(My Mentor saids that Netbeans is out of the question). So yeah not looking for actual help with my code just looking for a good 2-d animation tutorial.
As far as what I have to animate, simply put the user inputs an integer value or a string and the value goes from a box on the left side of the screen to an array on the right side. No sprite animation or pictures involved(gm) just animation of the user's input.
If I can actually get an example of a extremely simple JAVA animation that would be a great help as well.
Looking for a JAVA animation tutorial sitelooking for a JAVA animation tutorial site.
Page 1 of 1
8 Replies - 9221 Views - Last Post: 14 June 2007 - 10:18 AM
Topic Sponsor:
Replies To: Looking for a JAVA animation tutorial site
#2
Re: Looking for a JAVA animation tutorial site
Posted 13 June 2007 - 01:15 PM
i do not know of any tutorials, but you are looking for graphics. You can transform a string into a graphic, then using the graphics2D class and a few others to change the location and use repaint().
#3
Re: Looking for a JAVA animation tutorial site
Posted 13 June 2007 - 10:51 PM
Or simply putting it into a JLabel and moving it across the screen might do the trick.
#4
Re: Looking for a JAVA animation tutorial site
Posted 14 June 2007 - 09:11 AM
My new problem now is, I don't understand how the paths for the animations are determined. As in how do I control the direction of the Strings/Integers. I read one tutorial and it said that I do it pixel by pixel but that made no sense. So yeah how do I control where the strings/integers go. Also if the question is unclear sorry about that b/c I'm not sure what I'm trying to ask myself.
#5
Re: Looking for a JAVA animation tutorial site
Posted 14 June 2007 - 09:13 AM
i would use 1lacca's solution. Set the text of the JLabel to be your number or string or what-have-you. Then read the documentation, on placing it. Then just run a loop to continually change the position.
Are you familiar with forms and panels, etc?
Are you familiar with forms and panels, etc?
#6
Re: Looking for a JAVA animation tutorial site
Posted 14 June 2007 - 09:19 AM
William_Wilson, on 14 Jun, 2007 - 09:13 AM, said:
i would use 1lacca's solution. Set the text of the JLabel to be your number or string or what-have-you. Then read the documentation, on placing it. Then just run a loop to continually change the position.
Are you familiar with forms and panels, etc?
Are you familiar with forms and panels, etc?
You mean things such as Jbuttons and other things using swing?????
#7
Re: Looking for a JAVA animation tutorial site
Posted 14 June 2007 - 09:22 AM
yes, are you familiar with GUIs and javax.swing?
#8
Re: Looking for a JAVA animation tutorial site
Posted 14 June 2007 - 09:26 AM
never used the javax.swing before but I know how to make simple GUIs.
Right now I'm trying to understand what kind of logic is involved as far as the actual movement of the Jlabel/strings/integers. I know how to draw them I just don't know how to get them to move.
Right now I'm trying to understand what kind of logic is involved as far as the actual movement of the Jlabel/strings/integers. I know how to draw them I just don't know how to get them to move.
This post has been edited by legato bluesummer: 14 June 2007 - 09:26 AM
#9
Re: Looking for a JAVA animation tutorial site
Posted 14 June 2007 - 10:18 AM
the problem is not a difficult one, in fact it will take about 60 lines, including JFrame creation, applying attributes. To have it run smoothly and loop around you will need to learn the basics of threads (in the java tutorials). You will also need to learn about Font Metrics to gauge font sizes. If you give it a try and post your code we can help you.
I have a working example i can use to help guide you along as well.. once there is some effort.
I have a working example i can use to help guide you along as well.. once there is some effort.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|