Focusables tooltips
Focusable tooltips are eclipse-like tooltips original taken from RSyntaxTextArea project.
The nuiton-widget version also include modification to allow putting focusable
tooltips on non-JTextArea
, JComponent
.
Screenshots
Default tooltip:
Focused tooltip:
Using
To use focusable tooltip, you need to redefine the getTooltipText()
method
on related components
JTable table = new JTable(tableModel) { /** Single tooltip instance. */ protected FocusableTip focusableTip; @Override public String getToolTipText(MouseEvent e) { String text = super.getToolTipText(e); if (focusableTip == null) { focusableTip = new FocusableTip(this, null); } focusableTip.toolTipRequested(e, text); return null; } };