Take input through Buttons in java

Posted by stash211 on Stack Overflow See other posts from Stack Overflow or by stash211
Published on 2010-06-03T07:57:49Z Indexed on 2010/06/03 8:24 UTC
Read the original article Hit count: 183

Filed under:
|
|
|
|

I understand that the title might not be descriptive enough, but I'm making a magic square game in Java and basically, I'm trying to replicate user input as found in the sudoku game here: http://www.websudoku.com/.

What I have is a n x n grid of Buttons (not JButton) as the board and what I want the user to be able to do is when the user clicks on one of the buttons, similar to the game above, it allows the user to type in his guess in the button itself instead of popping up a dialog box with an input field of some sort.

I don't know where to start, I am a beginner in Java (not very beginner, but my knowledge with the various Java APIs is very limited), so I'm trying to find out if this would be possible and if it is, how would I go about doing it? Thanks for any help.

© Stack Overflow or respective owner

Related posts about java

Related posts about button