Looking for a JAVA animation tutorial site

looking for a JAVA animation tutorial site.

Page 1 of 1

8 Replies - 9221 Views - Last Post: 14 June 2007 - 10:18 AM Rate Topic: -----

Topic Sponsor:

#1 legato bluesummer  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 13-June 07

Looking for a JAVA animation tutorial site

Post icon  Posted 13 June 2007 - 12:48 PM

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.

Is This A Good Question/Topic? 0
  • +

Replies To: Looking for a JAVA animation tutorial site

#2 William_Wilson  Icon User is offline

  • lost in compilation
  • member icon

Reputation: 181
  • View blog
  • Posts: 4,789
  • Joined: 23-December 05

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().
Was This Post Helpful? 0
  • +
  • -

#3 1lacca  Icon User is offline

  • code.rascal
  • member icon

Reputation: 44
  • View blog
  • Posts: 3,822
  • Joined: 11-August 05

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.
Was This Post Helpful? 0
  • +
  • -

#4 legato bluesummer  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 13-June 07

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.
Was This Post Helpful? 0
  • +
  • -

#5 William_Wilson  Icon User is offline

  • lost in compilation
  • member icon

Reputation: 181
  • View blog
  • Posts: 4,789
  • Joined: 23-December 05

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?
Was This Post Helpful? 0
  • +
  • -

#6 legato bluesummer  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 13-June 07

Re: Looking for a JAVA animation tutorial site

Posted 14 June 2007 - 09:19 AM

View PostWilliam_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?



You mean things such as Jbuttons and other things using swing?????
Was This Post Helpful? 0
  • +
  • -

#7 William_Wilson  Icon User is offline

  • lost in compilation
  • member icon

Reputation: 181
  • View blog
  • Posts: 4,789
  • Joined: 23-December 05

Re: Looking for a JAVA animation tutorial site

Posted 14 June 2007 - 09:22 AM

yes, are you familiar with GUIs and javax.swing?
Was This Post Helpful? 0
  • +
  • -

#8 legato bluesummer  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 13-June 07

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.

This post has been edited by legato bluesummer: 14 June 2007 - 09:26 AM

Was This Post Helpful? 0
  • +
  • -

#9 William_Wilson  Icon User is offline

  • lost in compilation
  • member icon

Reputation: 181
  • View blog
  • Posts: 4,789
  • Joined: 23-December 05

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1