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

24
LINES

< > BotCompany Repo | #1009811 // Test "Nimbus" Look&Feel [OK]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (3155L/22K).

1  
!7
2  
3  
p {
4  
  bool ok = false;
5  
  for (final UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
6  
    S name = info.getName();
7  
    print("L&F found: " + name);
8  
    if (eq("Nimbus", name)) {
9  
      swing {
10  
        UIManager.setLookAndFeel(info.getClassName());
11  
        print("Nimbus activated!");
12  
        JFrame.setDefaultLookAndFeelDecorated(true); // doesn't do anything though
13  
        print("Updating windows");
14  
        updateLookAndFeelOnAllWindows_noRenew();
15  
        print("Renewing console frame");
16  
        renewConsoleFrame();
17  
        showForm("a", jtextfield());
18  
      }
19  
      ok = true;
20  
    }
21  
  }
22  
  if (!ok)
23  
    print("Nimbus not found.");
24  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, imzmzdywqqli, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1009811
Snippet name: Test "Nimbus" Look&Feel [OK]
Eternal ID of this version: #1009811/7
Text MD5: 613c41e609e4fefa8b549ba2590da7d3
Transpilation MD5: 341b8900df7fcbf6a4e3c57ad64bbfe0
Author: stefan
Category: javax / gui
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-18 04:01:52
Source code size: 686 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 626 / 1434
Version history: 6 change(s)
Referenced in: [show references]