Java JTable does not display gridlines

I showed a JTable. In JPanel JTable is located in a scrolling window

table.setShowGrid(true);

Here is a picture: note that there are no grid lines

Thank you first

Solution

Will the etched frame be different?

table.setBorder(new EtchedBorder(EtchedBorder.RAISED));

Edit:

The default color for gridlines appears to be white:

table.setGridColor(Color.BLUE)
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>