!7 p-awt { new L buttons; addAndReturn(buttons, makeButton("Default")); addAndReturn(buttons, makeButton("HCenter")).setHorizontalTextPosition(SwingConstants.CENTER); addAndReturn(buttons, makeButton("VBottom")).setVerticalTextPosition(SwingConstants.BOTTOM); JButton btn = addAndReturn(buttons, makeButton("HCenter/VBottom")); btn.setVerticalTextPosition(SwingConstants.BOTTOM); btn.setHorizontalTextPosition(SwingConstants.CENTER); btn = addAndReturn(buttons, makeButton("HCenter/VBottom, gap 20")); btn.setVerticalTextPosition(SwingConstants.BOTTOM); btn.setHorizontalTextPosition(SwingConstants.CENTER); btn.setIconTextGap(20); showFrame(jscroll(jfullcenter(hstackWithSpacing(buttons)))); } static JButton makeButton(S text) { ret jImageAndTextButton_defaultPlacement(#1010239, text, r { infoBox("Hello!") }); }