JComboBox fails to expand in JTable TableHeader

前端 未结 2 1286
旧巷少年郎
旧巷少年郎 2021-01-13 07:22

I have read through the majority of the JTable/JComboBox responses to other questions of this ilk, but haven\'t yet found a solution to my problem.

I have created a

2条回答
  •  不要未来只要你来
    2021-01-13 08:15

    This actually works exactly as expected. I think the clue is TableCellRenderer.

    Renderer's are typically non-interactive components. They are usually just a "snap-shot" of the component painted on to a surface and there is typically no way for a user to interact with them.

    This is the expected behavior.

    In order to supply editable functionality to the table header, you're going to need to supply your implementation of a JTableHeader

    Have a look at this example for some ideas

提交回复
热议问题