DevFaqOutlineViewHorizontalScrolling

How do I add horizontal scrolling support in the OutlineView component?

The OutlineView component already contains a JScrollPane, but the component's default behavior is to fit all the columns in the available space. If you have a large number of columns, say twenty or more, you may find that the horizontal space allocated to any one column is insufficient. In this case, you will likely want to disable table column resizing so that you can scroll left or right to see the data. This can be accomplished by adding one line of code:

outlineView.getOutline().setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo