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

8
LINES

< > BotCompany Repo | #1033571 // jSpinnerCommitOnValidEdit

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

Libraryless. Click here for Pure Java version (4708L/26K).

1  
static JSpinner jSpinnerCommitOnValidEdit(JSpinner spinner) {
2  
  var tf = getTextFieldFromSpinner(spinner);
3  
  if (tf != null) swing {
4  
    DefaultFormatter formatter = cast tf.getFormatter();
5  
    if (formatter != null) formatter.setCommitsOnValidEdit(true);
6  
  }
7  
  ret spinner;
8  
}

Author comment

Began life as a copy of #1033570

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1033571
Snippet name: jSpinnerCommitOnValidEdit
Eternal ID of this version: #1033571/3
Text MD5: 012f101cd4b5d5d3c6cc4f7f908286cb
Transpilation MD5: bf797586bcd10cad82d1fe73f6a48d9e
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-11-03 19:16:19
Source code size: 283 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 135 / 211
Version history: 2 change(s)
Referenced in: [show references]