문제

I have a abstractTableModel which I need to add rows to the top, so the user can see the most recent entered data, but default it adds to the bottom of the table. Any suggestions?

도움이 되었습니까?

해결책

다른 팁

If the AbstractTableModel is using List then just while adding the object to the list add it at the zeroth position in the list.

list.add(0, object);

and call respective fireXXXMethod

So now all the objects that are present will move to 1 postion up the list.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top