Quick way to disable table header in JTable

Last week was Java week. It involved quickly adding a new tab to an existing Java applet application. The layout has a nice larger table header section and allows for the table itself to have a sub-header.

That is pretty slick. Until you don't need a sub-header :). After a bit of searching I found a pretty Perl-ish way to disable table headers in Java's JTable.
myTable.setTableHeader(null); 
I kept looking for a disableTableHeader method.

This week its off to Excel, Web Posts and VBA again... yikes.

Comments

  1. There is another way too,
    MyTable.getTableHeader().setEnabled(false);
    It's going to diable the table header. It's work fine for me. The table header it would be displayed but You can't click on it or drag or edit, etc. (sorry for my english)

    ReplyDelete
  2. Thanks for sharing such a nice Blog.I like it.
    AVG support number

    ReplyDelete
  3. Your website is really cool and this is a great inspiring article. Much thanks to you such a great amount for sharing this sort of information.
    Visit us for online business card printing.

    ReplyDelete
  4. Ogen Infosystem is one of the best Website Designing and PPC Company in Delhi, India. Here you will well experience web designers and developers to provide a great website for your business. Our PPC Experts generate leads to your business products at an affordable price.
    PPC Company in Delhi

    ReplyDelete
  5. Thanks for sharing wonderful info, Found your post interesting, can not wait to see more from you. Good luck for upcoming post!!! You can also read more from Social media branding in Winnipeg

    ReplyDelete

Post a Comment

Popular posts from this blog

Template Toolkit Debugging inside of Perl Dancer

BootstrapX clickover

Changing Dancer::Plugin::Ajax's content type