This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Buttons without clicking animation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Buttons without clicking animation" Watch "Buttons without clicking animation" New topic
Author

Buttons without clicking animation

Gulshan Singh
Ranch Hand

Joined: Apr 22, 2009
Posts: 41
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.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
try using a JLabel/MouseListener
 
 
subject: Buttons without clicking animation
 
Similar Threads
Grids with selectable rows in JQuery
Invisible Buttons still visible
GUI building
Cade Sequence
JTable Cell