Results 1 to 3 of 3
  1. #1
    xiz1815 is offline Member
    Join Date
    Dec 2012
    Posts
    1
    Rep Power
    0

    Default GUI for BattleShip program

    Hi I am using Java via NetBeans and was looking for some help in writing a GUI for a battle ship program.
    I currently have a table of grey square buttons 15X15 and an actionlistener that goes off when the user clicks a button.
    I am wondering how I can make the button turn and stay black if a miss occurs and red if a hit.
    Any Ideas?

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,926
    Rep Power
    8

    Default Re: GUI for BattleShip program

    Can't you just set the background color?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. Battleship program
    By buckbuck2 in forum New To Java
    Replies: 2
    Last Post: 11-28-2012, 02:57 AM
  2. Battleship Program
    By zizou001 in forum New To Java
    Replies: 6
    Last Post: 11-15-2012, 08:21 AM
  3. Java Battleship Program
    By zizou001 in forum New To Java
    Replies: 6
    Last Post: 11-15-2012, 08:21 AM
  4. Help with Revised Battleship program
    By Lucid15 in forum New To Java
    Replies: 1
    Last Post: 04-19-2012, 07:18 AM
  5. Battleship 2D Array Program
    By AaronHopkins in forum New To Java
    Replies: 6
    Last Post: 04-05-2011, 04:38 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
  •