Is it possible to put a JPanel within a JTable cell?

N

Nigel

I have been able to add many different types of components to JTabel
cells such as Combo boxes, check boxes, etc.. but when I try adding a
JPanel I am unsuccessful. Is it possible to add a JPanel to a JTable
cell? I accomplish adding comboboxes, checkboxes, etc by telling the
custom table manager the type of class that should be displayed in
that particular column. (i.e: to display a combo box I specify
JComboBox.class) when I specify in the custom table manager that I
would like to display items of type JPanel.class, I am unable to see
the JPanel.

Has anyone been able to add a JPanel to a JTable or am shooting myself
in the foot?

Thanks for any advice.

- Nigel
 
D

Daniel Pitts

I have been able to add many different types of components to JTabel
cells such as Combo boxes, check boxes, etc.. but when I try adding a
JPanel I am unsuccessful. Is it possible to add a JPanel to a JTable
cell? I accomplish adding comboboxes, checkboxes, etc by telling the
custom table manager the type of class that should be displayed in
that particular column. (i.e: to display a combo box I specify
JComboBox.class) when I specify in the custom table manager that I
would like to display items of type JPanel.class, I am unable to see
the JPanel.

Has anyone been able to add a JPanel to a JTable or am shooting myself
in the foot?

Thanks for any advice.

- Nigel

JPanels are blank, so you wouldn't see them, would you?
 

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

Forum statistics

Threads
473,995
Messages
2,570,233
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top