Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding two Jtable's to a JScrollPane

how can i add two JTable's side by side in a JScrollPane using setViewPortView() option and set the size of the tables with respect to the size assigned to JscrollPane

like image 919
rahul anand Avatar asked Dec 04 '25 13:12

rahul anand


1 Answers

As shown here and here, let each table occupy its own scroll pane. Let one pane show a scrollbar always, while the other does so never. Then let both scrollbars share a common BoundedRangeModel.

like image 182
trashgod Avatar answered Dec 08 '25 20:12

trashgod



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!