2 Replies - 1482 Views - Last Post: 16 November 2010 - 10:11 PM Rate Topic: -----

#1 xZachtmx   User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 125
  • Joined: 14-June 09

What is the best component in Swing to make a soduku Table

Posted 16 November 2010 - 06:59 AM

I need to make a 9x9 table in Swing to make a soduku table. I tried using JTextBox but this is way to much work to make 81 boxes. I have used a JTable before but It would be hard to make that into a soduku table. (unless there is a way you can set the size of the cells without it changing). I want to also be able to clean the input so you can only input a number between 1-9 which i dont think you can do with textfields. Thanks for any suggestions!

Is This A Good Question/Topic? 0
  • +

Replies To: What is the best component in Swing to make a soduku Table

#2 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12657
  • View blog
  • Posts: 45,831
  • Joined: 27-December 08

Re: What is the best component in Swing to make a soduku Table

Posted 16 November 2010 - 07:06 AM

You could use a Custom TableCellRenderer to return a JTextField with a Custom Document that allows restricted input.
Was This Post Helpful? 1
  • +
  • -

#3 pbl   User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8381
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

Re: What is the best component in Swing to make a soduku Table

Posted 16 November 2010 - 10:11 PM

A grid layout with JLabel

http://www.dreaminco...-i-basic-tools/
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1