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

Discussion in 'Java' started by Nigel, May 31, 2007.

  1. Nigel

    Nigel Guest

    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
    Nigel, May 31, 2007
    1. Advertisements

  2. Nigel

    Daniel Pitts Guest

    JPanels are blank, so you wouldn't see them, would you?
    Daniel Pitts, May 31, 2007
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.