开发者

JTable without horizontal and vertical lines

How to create a JTable wi开发者_开发知识库thout vertical and horizontal lines in it...


Try playing around with setShowGrid(), setShowVerticalLines() and setShowHorizontalLines()

setShowVerticalLines()

Sets whether the table draws vertical lines between cells. If showVerticalLines is true it does; if it is false it doesn't.

Examples:

table.setShowGrid(false);
table.setShowVerticalLines(false);

table.setShowGrid(false);
table.setShowHorizontalLines(false);


jTable4.setShowHorizontalLines(true); // only HorizontalLines
  jTable4.setShowVerticalLines(true); //  only VerticalLines
  jTable4.setShowGrid(true);          // show Horizontal and Vertical
  jTable4.setGridColor(Color.yellow); // change line color 

use this code :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜