This week's book giveaway is in the Web Services forum.
We're giving away four copies of Microservices in Action and have Morgan Bruce & Paulo A. Pereira on-line!
See this thread for details.
Win a copy of Microservices in Action this week in the Web Services forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

How to make multi-rows in header of jTable  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Developers,

I want to make table in Java with two rows in header, like this:

|                       |              Title 2                |
|       Title 1       |------------------------------|
|                       |      Title 3     |     Tilte 4    |

For this reason I have proceed with this code in Netbeans-Java:

public table()
   String[][] tableHeader = new String[][] {
           new String[] {"Title1", ""},
           new String[] {"Title2", "Title3"},
           new String[] {"Title2", "Title4"}
    DefaultTableModel model = new javax.swing.table.DefaultTableModel(new Object [][]{}, tableHeader);

But I don't have good result.

Please help me.

Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!