labelForText

fun labelForText(text: String, icon: ImageIcon?): JLabel

Given text which is likely to match previously supplied text for this node, answer either a JLabel, using and/or caching it as appropriate.

Return

A suitable JLabel to present the provided text.

Parameters

text

The text to present, possibly starting with "" to indicate it should be interpreted as HTML3.2 styled text.

icon

The optional ImageIcon to show to the left of the text.