List of utility methods to do JScrollPane Create
JScrollPane | makeScrollPane(Component comp) make Scroll Pane JScrollPane pane = new JScrollPane(comp, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); pane.setPreferredSize(pane.getMinimumSize()); pane.setViewportBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); return pane; |
JScrollPane | makeScrollPane(Component comp) Create a scroll panel that sets its preferred size to its minimum size. JScrollPane pane = new JScrollPane(comp); pane.setPreferredSize(pane.getMinimumSize()); return pane; |
JScrollPane | wrapScroll(Component component) Wrap the given component with JScrollPane . return new JScrollPane(component); |
JScrollPane | wrapScrollPane(Component component) wrap Scroll Pane JScrollPane scrollPane = new JScrollPane(component); scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); return scrollPane; |