Results 1 to 4 of 4
  1. #1
    tojas is offline Member
    Join Date
    Nov 2007
    Posts
    3
    Rep Power
    0

    Default GridLayout with animation?

    Hello!

    I am writing a game, that GUI has GridLayout structure. My problem is when my charachter moves from square to square it is jumping and I want to animate it. What do you think, is this possible?

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    8

    Default

    Set your layout to null and use setLocation to move components. With null layout, in addition to adding a component to its container, you must also specify both a size and location for it to appear. You can use setBounds for this.

  3. #3
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    10

    Default

    If you are serious in game programming. I recommend you to find a game library in Java and develop your game in lower levels. Check JMonkey Engine. They draw graphics with OpenGL and also have classes to integrate Swing/SWT components with your game...

  4. #4
    tojas is offline Member
    Join Date
    Nov 2007
    Posts
    3
    Rep Power
    0

Similar Threads

  1. Animation with Animated GIF
    By JavaBean in forum Java 2D
    Replies: 3
    Last Post: 06-04-2011, 04:26 PM
  2. Animation Delay - Thread problem
    By wererabit in forum Advanced Java
    Replies: 3
    Last Post: 04-10-2009, 10:35 PM
  3. Text Animation
    By rossomandop@acm.org in forum AWT / Swing
    Replies: 4
    Last Post: 05-30-2008, 03:34 AM
  4. SWT GridLayout
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-08-2008, 09:04 AM
  5. Gridlayout
    By Marty in forum AWT / Swing
    Replies: 2
    Last Post: 05-31-2007, 11:48 AM

Posting Permissions

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