Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

9
LINES

< > BotCompany Repo | #1031903 // setSliderValue

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (7985L/45K).

svoid setSliderValue(JSlider slider, int value) {
  if (slider != null) swing {
    // clamp for convenience (XXX - necessary?)
    slider.setValue(
      clamp(value,
        slider.getMinimum(),
        slider.getMaximum());
  }
}

Author comment

Began life as a copy of #1026709

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1031903
Snippet name: setSliderValue
Eternal ID of this version: #1031903/3
Text MD5: 24d6465af4c19025d1e1b375e83cf475
Transpilation MD5: ae49c6a6cc9242ba88a2b65bcfd8ca21
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-05-17 20:27:29
Source code size: 240 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 224 / 288
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1035161 - setSliderMax