Example usage for java.awt Scrollbar setSize

List of usage examples for java.awt Scrollbar setSize

Introduction

In this page you can find the example usage for java.awt Scrollbar setSize.

Prototype

public void setSize(int width, int height) 

Source Link

Document

Resizes this component so that it has width width and height height .

Usage

From source file:gdsc.utils.HSB_Picker.java

private void createSliderPanel(final Scrollbar sliderField, String label, final Label sliderLabel,
        final double scale) {
    Label listLabel = new Label(label, 0);
    add(listLabel, 0, 1);//from  w w w  .jav a  2  s  .c o m
    sliderField.setSize(100, 10);
    c.ipadx = 75;
    add(sliderField, 1, 1);
    c.ipadx = 0;
    sliderField.addAdjustmentListener(new AdjustmentListener() {

        public void adjustmentValueChanged(AdjustmentEvent e) {
            setSliderLabel(sliderField, sliderLabel, scale);
        }
    });
    add(sliderLabel, 2, 1);
    setSliderLabel(sliderField, sliderLabel, scale);
    row++;
}