Text Panes
VAqua supports native text component borders, backgrounds, and focus rings on text panes
(instances of JTextArea, JTextPane, and JEditorPane).
The native border and background can be suppressed by installing an application defined border
(for example, a zero-sized EmptyBorder)
or by explicitly setting the opaque attribute
(to either true or false).
The focus ring can be suppressed by making the text pane not-focusable or by
setting the Aqua.useFocusRing client property to (Boolean) false.
Native borders, backgrounds, and focus rings are also supported on text panes that are made scrollable
by wrapping them in a JScrollPane, under the following conditions:
- The text pane does not have an application defined border.
- The text pane opaque attribute has not been set by the application.
-
The text component parent is a
JViewportwith one child. -
The
JViewportis associated with aJScrollPaneancestor. - The scroll pane does not have an application defined border.
When these conditions are met, the native text component border, background, and focus ring are displayed on the scroll pane instead of the text pane.