Creating multi-line header for JTable

I use JTable GUI component with NetBeans.

  • I want to create multi-line headers

  • I am able to this, when I create custom renderer for table headers

  • BUT I don’t want to, because I like default one (I use it everywhere else in program).

  • So the problem is : How to make
    header heigher?

My code :

String headers[] = new String[3];
    headers[0] = "Header1";
    headers[1] = "Header2";
    headers[2] = "<html><center>Long<br>Centered</br></center></html>";
    DefaultTableModel dtm = new DefaultTableModel();
    dtm.setColumnIdentifiers(headers);
    dtm.setRowCount(5);
    jTable1.setModel(dtm);
    jTable1.getTableHeader().setPreferredSize(
                new Dimension(jTable1.getColumnModel().getTotalColumnWidth(),32));