Posted by newcron
on March 21, 2010 at 5:59 AM PDT
I want to decorate the currently selected row of a JXTable (which is basically a subclassed JTable from the SwingX Project) with some buttons that are kinda flying over the current row. To do so, I wrapped the Table inside a JXLayer and put the Buttons on the layer's glass pane.
Afterwards, I put the layer inside a JScrollPane.
This causes some issues tough:
first, the Table's Header disappears (this however can easily be fixed, by setting the RowHeader of the ScrollPane manually)
secondly, tough scrolling the table via mouse wheel does not work anymore. I tried to override the processMouseWheelEvent to dispatch the Event to the ScrollPane, however, it seems like not all events are delivered correctly.
Of course I could wrap the scrollpane with the JXLayer instead of the table. Then however, I'd have to take care of updating the position and the clipping of the overlayed buttons manually.
Am I missing any better solution for this problem here or is there no other way to got?