void () { NST.loadLibraryImpl(); final JFrame f = new JFrame(); f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); f.setBounds(0, 0, 500, 110); f.setVisible(true); new Thread(()-> { int c = 1; while (--c >= 0) { final TBPanel testTB = _createSimpleTestTouchbar(); testTB.selectVisibleItemsToShow(); testTB.setTo(null); try { Thread.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); } NST.setTouchBar(null, ID.NIL); testTB.release(); } }, "com.intellij.ui.mac.touchbar.TouchbarTest._createFrame").start(); }