scope stefansOS_loadingAnimation. sS #text = "Stefan's OS is loading..."; static JFrame stefansOS_loadingAnimation(final Runnable onStop) { final JLabel label = jcenteredlabel(text); JPanel panel = jBackground(Color.black, centerAndSouth(centerAndSouth( withMargin(50, jimage(#1101279)), withMargin(20, 40, 0, 40, setForeground(Color.white, setFont(#1011145, 60, label)))), withMargin(20, jcenteredline(/*setMargin(10,*/ jbutton("STOP", r { disableButton(); //setText(heldInstance(JButton), "Stopping..."); setText(label, "STOPPING"); callF(onStop); }))))); ret onWindowClosing(showCenterPackedFrame(text, panel), onStop); } end scope