Uses of Interface javax.swing.text.Highlighter (Java Platform SE 8 )
Date: 2026-04-24

## Uses of Interface
javax.swing.text.Highlighter

- Packages that use Highlighter
  Package | Description
  --- | ---
  javax.swing.plaf.basic | Provides user interface objects built according to the Basic look and feel.
  javax.swing.text | Provides classes and interfaces that deal with editable and noneditable text components.

- - ### Uses of Highlighter in javax.swing.plaf.basic

    Classes in javax.swing.plaf.basic that implement Highlighter
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `BasicTextUI.BasicHighlighter`

    Methods in javax.swing.plaf.basic that return Highlighter
    Modifier and Type | Method and Description
    --- | ---
    `protected Highlighter` | BasicTextUI.`createHighlighter()` Creates the object to use for adding highlights.

  - ### Uses of Highlighter in javax.swing.text

    Classes in javax.swing.text that implement Highlighter
    Modifier and Type | Class and Description
    --- | ---
    `class` | `DefaultHighlighter` Implements the Highlighter interfaces.
    `class` | `LayeredHighlighter`

    Methods in javax.swing.text that return Highlighter
    Modifier and Type | Method and Description
    --- | ---
    `Highlighter` | JTextComponent.`getHighlighter()` Fetches the object responsible for making highlights.

    Methods in javax.swing.text with parameters of type Highlighter
    Modifier and Type | Method and Description
    --- | ---
    `void` | JTextComponent.`setHighlighter(Highlighter h)` Sets the highlighter to be used.

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.