Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Square game

 
Abhin Balur
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I want to try my hands on developing some small games. I would like to start with the Square game; the one which involves sequecning the numbers, and placing them in sorted order. However i am new to Swings. So the only hurdle here is developing the GUI for me beause rest all would be pure logic. I would like to know which layout manager would be helpful, as it will involve relocating the components on a Jpanel and any method which would do the same.

Thank You.
Regards.
 
Brian Legg
Ranch Hand
Posts: 488
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I had to guess I would say probably a grab bag layout.... but you may want to ask the guys over on the Swing/AWT forum since this is more of a GUI question then an actual game question.

GL
 
Fred Hamilton
Ranch Hand
Posts: 684
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consider using JLabels as piece components. You might also consider a gridlayout. which would be simpler than a gridbag layout. if there are any issues with gridlayout having an empty cell then you could just use a blank Jlabel for that cell.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic