Java JSlider fixWinSliderUI(JSlider s)

Here you can find the source of fixWinSliderUI(JSlider s)

Description

fix Win Slider UI

License

LGPL

Declaration

public static void fixWinSliderUI(JSlider s) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.awt.Dimension;

import javax.swing.JSlider;

import javax.swing.plaf.basic.BasicSliderUI;

public class Main {
    public static void fixWinSliderUI(JSlider s) {

        if (System.getProperty("os.name").toLowerCase().contains("win")) {
            s.setUI(new BasicSliderUI(s) {
                protected Dimension getThumbSize() {

                    Dimension old = super.getThumbSize();

                    return new Dimension(old.width * 2, old.height);
                }/*ww  w. j  ava2s  . c  om*/
            });
        }
    }
}

Related

  1. ajustarValorDeslizador(JSlider sldActual, int valor)
  2. buildIntegerFieldWithSlider(final JSlider matchingSlider)
  3. createJSlider(final BoundedRangeModel model)
  4. createLabelField(String preText, String postText, JSlider s)
  5. createSliderPanel(final JSlider slider, String label, int width)
  6. makeLabelSliderPanelHorizontal(String text, JSlider slider)
  7. reapplyFontSize(JSlider slider)
  8. setMinMaxSliderLabels(JSlider slider, String[] labels)
  9. setSliderLabels(JSlider slider, int[] values, String[] labels)