Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2007

Tip: Looking for answers? Try searching our database.

BattleShip Game App using Swing

Thread view: 
KDawg44 - 24 May 2007 00:18 GMT
Hi,

For a class I am taking I have to write a Battleship game.  I am using
Swing to program a GUI and I would like to make it so that there are
two panes holding the 11x11 grid for the spots on the computer's and
the player's boards.  I would like the position of the ships on the
players board to be marked somehow and I would like the user to be
able to click on the a spot on the other board to choose their shot
when it is there turn.  I would like to also prevent them from
choosing the same spot twice.

What should I use to create the boards in Swing?  What would be the
best way to try to accomplish something like this?  I would also like
to use images to show results, red X if its a miss, and an explosion
image if it is on.  And also an image of a ship for the positions on
the player's board.

My project does not require all this GUI work, it is more text based
using Java Sockets but I am interested in the GUI part and Swing.

Thanks very much in advance for any direction you provide and I look
forward to the challenge.  I am an average Java developer but not that
great when it comes to GUIs.

Thanks.
Andrew Thompson - 24 May 2007 00:38 GMT
...
> For a class I am taking I have to write ..

..multiple posts?

Please refrain from multi-posting in future.
<http://www.physci.org/codes/javafaq.html#xpost>

(X-post to c.l.j.p./g., w/ f-u to c.l.j.p. only)

Andrew T.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.