File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Partitioning a JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Partitioning a JTable " Watch "Partitioning a JTable " New topic

Partitioning a JTable

Ajay Singh
Ranch Hand

Joined: Jan 04, 2008
Posts: 105
i am stuck up with one requirement ,so posting it here.i have an Object array containing 3 values.0th Object position contains two fields ,an integer(containing 2008) and and arraylist three elements(ie "A","B","C").likewise 1st position contains 2007 and 2nd postion contains 2006.Arraylist is same in 1st and 2nd position like the 0th position.Now in a JTable i want to display the values of each position with some kind of partitioning.Like first the constant column names of Jan,Feb,Mar would be displayed ,followed by first 2008(table header) ,followed by the values(A,B,C).Next 2007(table header) comes then values(A,B,C),and lastly 2006(table header) and the values (A,B,C).Partitioning should be there before the second and third table header.
Any pointers would be useful.
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
This is the closest I could get with table components.
Ajay Singh
Ranch Hand

Joined: Jan 04, 2008
Posts: 105
Thanks craig for your reply
It is sorta covered in the JavaRanch Style Guide.
subject: Partitioning a JTable
Similar Threads
Render,set editor to JTable Cells
Problem in JTable row selection
JTable issues