Skip to main content

table without a header

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
5 replies [Last post]
404_not_found
Offline
Joined: 2010-11-25

Hello. I need a table without a header. If i use:

TableModel model = new DefaultTableModel(new String[] {null, null, null}, new Object[][] {

{"1", "2", "3"},

{"4", "5", "6"},

{"7", "8", "9"},

empty line of header still on screen.

How I can remove the headers?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vprise
Offline
Joined: 2003-11-07

Table.setIncludeHeader()

404_not_found
Offline
Joined: 2010-11-25

It does not help. Header remained, but disappeared a dividing line between the cells.

vprise
Offline
Joined: 2003-11-07

Are you using SVN or 1.4.

Please provide a screenshot or more detailed description since its hard to understand the problem, looking at the current code this should work as expected.

404_not_found
Offline
Joined: 2010-11-25

Right table with table.setIncludeHeader(false), left - without.

vprise
Offline
Joined: 2003-11-07

Thanks, I see the problem I'll fix it in my next commit.