Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-12-2007, 02:57 PM
Member
 
Join Date: Nov 2007
Posts: 3
Rep Power: 0
tojas is on a distinguished road
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?
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 11-12-2007, 09:06 PM
hardwired's Avatar
Senior Member
 
Join Date: Jul 2007
Posts: 1,577
Rep Power: 4
hardwired is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-12-2007, 09:26 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
Rep Power: 10
JavaBean is on a distinguished road
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...
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 11-12-2007, 11:16 PM
Member
 
Join Date: Nov 2007
Posts: 3
Rep Power: 0
tojas is on a distinguished road
Default
Thank you guys
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Animation Delay - Thread problem wererabit Advanced Java 3 04-10-2009 11:35 PM
Text Animation rossomandop@acm.org AWT / Swing 4 05-30-2008 04:34 AM
SWT GridLayout Java Tip Java Tips 0 01-08-2008 10:04 AM
Animation with Animated GIF JavaBean Java 2D 1 06-07-2007 06:11 PM
Gridlayout Marty AWT / Swing 2 05-31-2007 12:48 PM


All times are GMT +2. The time now is 12:39 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org