Putting a JTable inside a JTable cell?

T

Tivo Escobar

Hi guys,

I was starting to build a frame using Swing and had the weird ideia of
putting a JScrollPane/JTable inside a JTable cell. I have already
developed other tables with specialized Models, CellRenderers and
CellEditors, but never tried to draw a panel using a CellRenderer. Has
anybody ever tried it? Any sample code?

The point is that I need to present data in a hierarchical manner. For
example, imagine that the main table is called "Models Table" and
presents information about car models. One of the columns of this
table is called "Cars Column" and presents information about each car
of that specific model. My data can grow during runtime, that is why
using tables. Using JTree could solve the hierarchical problem, but
would not fit visually. Any other suggestion?

Thanx in advance,
Tivo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top