Skip to content

Commit 61c5e30

Browse files
committed
Add auto scroll and resize
1 parent a0eeacc commit 61c5e30

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/kotlin/ReflectPanel.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class ReflectPanel : AbstractPanel() {
1717
private val panel = JSplitPane(JSplitPane.VERTICAL_SPLIT)
1818

1919
init {
20-
ReflectionActions(this, model.reflections)
21-
table.autoResizeMode = JTable.AUTO_RESIZE_OFF
20+
ReflectionActions(this)
21+
table.autoResizeMode = JTable.AUTO_RESIZE_ALL_COLUMNS
2222
table.columnModel.getColumn(0).preferredWidth = 30 // ID
2323
table.columnModel.getColumn(1).preferredWidth = 50 // method
2424
table.columnModel.getColumn(2).preferredWidth = 120 // host
@@ -32,6 +32,7 @@ class ReflectPanel : AbstractPanel() {
3232
table.columnModel.getColumn(10).preferredWidth = 100 // protocol
3333
table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
3434
table.rowSorter = TableRowSorter(model)
35+
table.autoscrolls = true
3536

3637
table.selectionModel.addListSelectionListener {
3738
if (table.selectedRow != -1) {

0 commit comments

Comments
 (0)