0

I want to add a JPanel to a column header of the JTable. Searched a lot, but could not find any answer. Please help me on this.

Thank you.

mKorbel
  • 109,107
  • 18
  • 130
  • 305
  • 1
    Yes, take a look at http://stackoverflow.com/questions/13213838/how-can-i-set-a-jlabels-background-and-border-the-same-as-a-table-header/13225985#13225985 – MadProgrammer Nov 09 '12 at 20:11
  • 1
    As well as this [Q&A](http://stackoverflow.com/q/7137786/230513). – trashgod Nov 09 '12 at 20:12

2 Answers2

1

Not directly.

If you want to change the appearance of a cell, then you need to write a custom cell renderer:

paulsm4
  • 107,438
  • 16
  • 129
  • 179
0

http://www.coderanch.com/t/339979/GUI/java/Adding-JComboBox-JTable-header. Here's a link similar to your requirement. JComboBox in Jtable header insted of jpanel. This should help you. Agree with paulsm4.

Raghunandan
  • 131,557
  • 25
  • 223
  • 252