!7 module FontPlus > DynSingleFunctionWithPrintLog { transient volatile bool active; double scale = 1.25; start { ownResource(vmBus_onMessage('mouseDown, voidfunc(int x, int y, int button) { if (!active) ret; active = false; final JComponent c = optCast(JComponent, componentAtScreenLocation(x, y)); print("Have component: " + c); if (c == null) ret; swing { Font font = scaleFont(c.getFont(), scale); c.setFont(font); print("Enlarged font to " + formatDouble(font.getSize2D(), 1)); } })); } void doIt { print("Please click on a component to enlarge its font"); set active; } }