Snake game

How to develop snake game using swings in java

Page 1 of 1

2 Replies - 4027 Views - Last Post: 22 November 2008 - 12:21 PM Rate Topic: -----

#1 ashhu.t  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 22-November 08

Snake game

Post icon  Posted 22 November 2008 - 04:37 AM

how to develop snake game using java with swings only
Is This A Good Question/Topic? 0
  • +

Replies To: Snake game

#2 n8wxs  Icon User is offline

  • --... ...-- -.. . -. ---.. .-- -..- ...
  • member icon

Reputation: 972
  • View blog
  • Posts: 3,878
  • Joined: 07-January 08

Re: Snake game

Posted 22 November 2008 - 12:21 PM

Welcome!

[rules][/rules]
Was This Post Helpful? 0
  • +
  • -

#3 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8324
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Snake game

Posted 22 November 2008 - 12:21 PM

View Postashhu.t, on 22 Nov, 2008 - 03:37 AM, said:

how to develop snake game using java with swings only


You mean the snake that moves, eat stuff, growths and growths and that shouldn't eat itself ?

Use a GridLayout filled with JLabels
set these JLabel setOpaque(true)
have a thread to update snake position every second

[rules][/rules]
Was This Post Helpful? 1

Page 1 of 1