Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By DarrylBurke

Thread: animations with java?

  1. #1
    shujisan87 is offline Member
    Join Date
    Sep 2011
    Posts
    2
    Rep Power
    0

    Default animations with java?

    I am very new to programming.

    I have been tasked to develop a teaching aid for engineering problems.
    the program will have the user input the parameters required to solve the problem, then create on the spot animations pertaining to the parameters defined by the user?

    I would like to know if this is possible.

    Thank you!

  2. #2
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    620
    Rep Power
    4

    Default Re: animations with java?

    Yes Sure. Look at on a canvas. This is a swing component.
    Skype: petrarsentev
    http://TrackStudio.com

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,452
    Rep Power
    20

    Default Re: animations with java?

    No, Canvas is an AWT component. Custom painting in Swing is best done by overriding paintComponent(...) of a JComponent or JPanel. Animation can be handled by a Timer that sets state and calls repaint().

    Trail: Creating a GUI With JFC/Swing (The Java™ Tutorials) -- find the sections on custom painting and how to use timers. Since you're new to Swing, you'll need to go through various other parts of the tutorial, including the part about concurrency.

    db
    Fubarable likes this.

  4. #4
    shujisan87 is offline Member
    Join Date
    Sep 2011
    Posts
    2
    Rep Power
    0

    Default Re: animations with java?

    Thank you guys! I've decided to use Java as my language of choice for the task. I'll go work on it! :)

Similar Threads

  1. Animations not refreshing
    By zshaw in forum New To Java
    Replies: 1
    Last Post: 12-26-2010, 01:05 AM
  2. Graphics/animations etc. Where to begin?
    By Mattedatten in forum New To Java
    Replies: 2
    Last Post: 03-16-2010, 06:51 PM
  3. SWT Animations Example
    By Java Tip in forum SWT Tips
    Replies: 0
    Last Post: 06-28-2008, 10:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •