Class ScrollUtil

java.lang.Object
ca.corbett.extras.ScrollUtil

public class ScrollUtil extends Object
Contains static convenience methods related to scroll panes.
Since:
swing-extras 2.8 (refactored from older code)
Author:
scorbo2
  • Method Details

    • buildScrollPane

      public static JScrollPane buildScrollPane(Component component)
      A static convenience method to generate a JScrollPane with more sensible default values. Seriously, why is the default behavior to scroll 1 pixel at a time when you mouse wheel?
      Parameters:
      component - Any Component that needs scrolling.
      Returns:
      A JScrollPane that won't take a million years to scroll through.
    • buildScrollPane

      public static JScrollPane buildScrollPane(Component component, int unitIncrement)
      A static convenience method to generate a JScrollPane with more sensible default values. Seriously, why is the default behavior to scroll 1 pixel at a time when you mouse wheel?
      Parameters:
      component - Any Component that needs scrolling.
      unitIncrement - How much to scroll by (I believe this is a pixel value).
      Returns:
      A JScrollPane that won't take a million years to scroll through.