Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Sudoku Applet

 
Nikki McCartney
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey there.

I'm working on a 9x9 Sudoku Applet which solves the Sudoku puzzle the user puts in.
I'm totally lost on how I can take the input( which is supposed to be in any random place in the 9x9 grid) and pass them to the code I've made.
I really don't think I can create 81 textfields and take those values to the sudoku solver function.
I tried to check GridLayout but I dont see anything which says it can be applied with textfields.
Somebody please help. I shall be really grateful.

Thanks!
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I created a Sudoku Swing GUI some years ago, I had a Tile class (which extended JPanel) which -when clicked on- would show a popup menu with the 9 digits from which the user could choose one. I also had a SudokuPanel class that also extended JPanel and which encapsulated 9x9 Tile objects.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!