• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Buttons without clicking animation

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm making a battleship game, and I need to make a grid where the user can click to select where their ships are supposed to be and fire at enemy ships. Basically I need a button for each cell in the grid but not a button where it has the clicking animation, just a flat cell that puts a dot in the cell where the user clicked. Alternatively, I could have put a boundary on each cell and checked for a click in that boundary, but in an 8x8 grid, that is 64 boundaries to set. Sorry if that was hard to understand. If you don't understand just ask.
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try using a JLabel/MouseListener
 
reply
    Bookmark Topic Watch Topic
  • New Topic