static S lineAtMouse() { ret swing(func -> S { Component c = (Component) componentAtMouse_gen(); if (c instanceof JLabel) ret getText((JLabel) c); if (c instanceof JTextComponent) { JTextComponent tc = cast c; Point d = mouseToComponent(c); int idx = tc.viewToModel(d); S text = tc.getText(); ret lineAroundIndex(text, idx); } ret ""; }); }