'Creating Groups in JTable

I am trying to create groups in a JTable based on item-type. For example, Item 1, 2, and 3 would be one type, while 4 and 5 would be another. I would also like to separate group 1 from group 2 with an empty row for visibility's sake.

Item Name Time Created Location Color
Item 1 Item 1 time Item 1 loc Item 1 color
Item 2 Item 2 time Item 2 loc Item 2 color
Item 3 Item 3 time Item 3 loc Item 3 color
Item 4 Item 4 time Item 4 loc Item 4 color
Item 5 Item 5 time Item 5 loc Item 5 color

Is this possible with JTable or should I look into something else?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source