Example usage for javax.swing.text Highlighter.HighlightPainter interface-usage

List of usage examples for javax.swing.text Highlighter.HighlightPainter interface-usage

Introduction

In this page you can find the example usage for javax.swing.text Highlighter.HighlightPainter interface-usage.

Usage

From source file LineHighlightPainter.java

public class LineHighlightPainter implements Highlighter.HighlightPainter {

    private void paintLine(Graphics g, Rectangle r, int x2) {
        int ytop = r.y + r.height - 3;
        g.fillRect(r.x, ytop, x2 - r.x, 3);
    }

From source file LineHighlightPainter.java

public class LineHighlightPainter implements Highlighter.HighlightPainter {

    // paint a thick line under one line of text, from r extending rightward to
    // x2
    private void paintLine(Graphics g, Rectangle r, int x2) {
        int ytop = r.y + r.height - 3;