problem implementing table

problem implementing table

Post by K Gau » Sat, 21 Jun 2008 15:12:55

hello friends

i m trying to make a game and implement it as swing application
plugged into applet. the game is similar to snakes and ladders game
but much more dynamic.

for that i need to make a 10*10 table
some rows in table should have height greater than others

also there are no column names ... since the cells in table represent
a block

please tell how to deal with this


problem implementing table

Post by Roedy Gree » Sat, 21 Jun 2008 21:30:22

On Thu, 19 Jun 2008 23:12:55 -0700 (PDT), K Gaur < XXXX@XXXXX.COM >
wrote, quoted or indirectly quoted someone who said :

JTables don't have variable height rows, IIRC.

SO I think you will need to invent your own component that uses low
level drawing tools to paint on a Canvas (AWT) or a Panel (Swing).

for some hints.

This is fairly tricky stuff. What you might think about is using
double rows to simulate a tall row, then fake it with JTable.


Roedy Green Canadian Mind Products
The Java Glossary