Example usage for javax.swing.text JTextComponent setSelectionColor

List of usage examples for javax.swing.text JTextComponent setSelectionColor

Introduction

In this page you can find the example usage for javax.swing.text JTextComponent setSelectionColor.

Prototype

@BeanProperty(preferred = true, description = "color used to render selection background")
public void setSelectionColor(Color c) 

Source Link

Document

Sets the current color used to render the selection.

Usage

From source file:Main.java

public static void main(String[] argv) {
    JTextComponent c = new JTextArea();

    c.setSelectionColor(Color.green);
}