Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

grid appearance

 
Tris Rabar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
Is there a way to arrange information such that it appears as a grid, except using a JTable?
I want to implement a grid of 0's and 1's, a bit map.
Thanks!
 
Rajendar Goud
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I think u can use GridLayout(int rows,int cols)
or GridBagLayout()for this..
Raj
 
Tris Rabar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey..thanks for the suggestion...but is there a way for this to give you gridlines?
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes. you can use a border around each component you put in the gridLayout to give you the lines you want.
 
Tris Rabar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey...thanks a lot. But here's the deal: I would need to put info that has to be changed in each 'gridbox'. If I'm using this approach, that is, gridlayout and borders, then I might have to use something like a label in each grid, and keep changing this....is there any better way to do this?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic