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