0

I want to make a jtable in Java Swing and put on first row search/filter options like here.

It does not have to be specific like that, but what i want is that those text fields/combo boxes etc to fit table's columns width (even when using resize).

The data comes in jtable from a sql database so if this will mess the ids then it's ok to have it above the table, the only constraint is that those fields to match column width of the table.

Thank you.

Florin Ics
  • 7
  • 1
  • 8
  • http://docs.oracle.com/javase/tutorial/uiswing/components/table.html#combobox – Jeremiah Stillings Oct 10 '17 at 20:44
  • Look towards providing a custom header view instead – MadProgrammer Oct 10 '17 at 20:50
  • I would suggest having a look at this [previous question](https://stackoverflow.com/questions/15099029/jcombobox-fails-to-expand-in-jtable-tableheader/15100518#15100518) for some ideas – MadProgrammer Oct 10 '17 at 21:41
  • I looked at the documentation, but what i want is to keep the table header and freeze the first row for search, and not to let it be affected by sort/scroll or any other table operation. For instance like in Excel when you freeze a number of rows and scroll below those rows. – Florin Ics Oct 11 '17 at 05:20

0 Answers0