e789. 限制用JSpinner实现数字选择的值

// Create a number spinner that only handles values in the range [0,100]
    int min = 0;
    int max = 100;
    int step = 5;
    int initValue = 50;
    SpinnerModel model = new SpinnerNumberModel(initValue, min, max, step);
    JSpinner spinner = new JSpinner(model);

 

Related Examples
posted @ 2018-09-06 09:08  borter  阅读(215)  评论(0编辑  收藏  举报