I have displayed a JTable in my JPanel.The JTable is inside a scrollpane. The only problem is the gridlines are not showing up.I tried to use this line of code but it didn't work.
table.setShowGrid(true);
Below is a picture: Note there are no gridlines
Thank you in advance.
Does having an etched border make a difference?
table.setBorder(new EtchedBorder(EtchedBorder.RAISED));
EDIT:
The default colour of grid-lines seems to be white:
table.setGridColor(Color.BLUE)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With