JTable row resizing using ..JxLayer
Posted by Pavan Kumar on September 16, 2010
A common usecase for a JTable is to manually resize rows . One solution googled was Make JTable Resizable
It works fine with a couple of drawbacks..
- If the CellEditor gets activated on mouseMove(as in my application) the mouse events will be consumed by the editor component , and the table mouseListeners(for Dragging) will Not be notfied.
- Working around the problem of rowSelection,when resizing ..needed the underlying table to be modified.
This seemed a perfect usecase for JxLayer
- Get all MouseEvents from any component parented by the underlying Table.
- Lock the UI on MouseMove & prevent the RowSelection in the table from changing(on mousePressed).
The class RowResizerUI extends LockableUI(from JxLayer) & provides row resizing for the underlying table.
![]()
Advertisement
JOKe said
it works good but there is a very very bad flicking for fonts..
Windows 7, 64bit, with clear type on.
As I see the clear type is on/off on/off every … 2 secounds or something like that
which makes this unusable in real app.
JTable row resizing using ..JxLayer said
[...] gets activated on mouseMove(as in my application) the mouse events will be consumed by… [full post] Pavan Kumar GUI in 2Dimensions guijavaswing 0 0 0 0 [...]