| Author |
JTable (Size and Colour)
|
Jessie Tan
Greenhorn
Joined: Apr 17, 2004
Posts: 12
|
|
|
i place a JTable in Jframe... May i know how to set size for the JTable and as well as color??
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
Depends on if you are using a LayoutManager or not. If you are, the JTable's size is dependent on the size of the JFrame. If not, a simple setBounds(int xpos, int ypos, int width, int height) will suffice. As far as the color, what on the JTable are you wanting the color changed?
|
 |
Jessie Tan
Greenhorn
Joined: Apr 17, 2004
Posts: 12
|
|
i wanna change the color of the empty space.. whereby there's no col and row all that.. the grey color thingy..
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
Originally posted by Jessie Tan: i wanna change the color of the empty space.. whereby there's no col and row all that.. the grey color thingy..
So you don't want the grid lines?
|
 |
Jessie Tan
Greenhorn
Joined: Apr 17, 2004
Posts: 12
|
|
yes.. i want the grid line... wat i mean is, if my frame is big, and the table din take up all the space, there will have a big space of grey color thingy... with nothing there... and i wanna that too other color..
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
Originally posted by Jessie Tan: yes.. i want the grid line... wat i mean is, if my frame is big, and the table din take up all the space, there will have a big space of grey color thingy... with nothing there... and i wanna that too other color..
Ahhh, ok, I know what you are talking about now. But I have never been able to find a solution to this. I will keep researching it though.
|
 |
Jessie Tan
Greenhorn
Joined: Apr 17, 2004
Posts: 12
|
|
Never mind is ok... anyway thanx alot..
|
 |
 |
|
|
subject: JTable (Size and Colour)
|
|
|