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

25
LINES

< > BotCompany Repo | #1020971 // jProgressBarWithText

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

Libraryless. Click here for Pure Java version (9226L/51K).

static JProgressBar jProgressBarWithText() {
  ret swing(-> {
    new JProgressBar bar;
    bar.setStringPainted(true);
    ret bar;
  });
}

static JProgressBar jProgressBarWithText(int maxValue) {
  JProgressBar bar = jProgressBarWithText();
  swing { bar.setMaximum(maxValue); }
  ret bar;
}

static JProgressBar jProgressBarWithText(int maxValue, S text) {
  var bar = jProgressBarWithText(maxValue);
  swing { bar.setString(text); }
  ret bar;
}

static JProgressBar jProgressBarWithText(S text) {
  var bar = jProgressBarWithText();
  swing { bar.setString(text); }
  ret bar;
}

Author comment

Began life as a copy of #1006964

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020971
Snippet name: jProgressBarWithText
Eternal ID of this version: #1020971/4
Text MD5: 5e4d6bb2c7add79cdb7d2026a8096c8a
Transpilation MD5: 7a756fcf6a146135eb5e34d889503042
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-10-25 22:30:40
Source code size: 608 bytes / 25 lines
Pitched / IR pitched: No / No
Views / Downloads: 364 / 464
Version history: 3 change(s)
Referenced in: [show references]