Example usage for javax.swing JEditorPane getBackground

List of usage examples for javax.swing JEditorPane getBackground

Introduction

In this page you can find the example usage for javax.swing JEditorPane getBackground.

Prototype

@Transient
public Color getBackground() 

Source Link

Document

Gets the background color of this component.

Usage

From source file:EditorDropTarget3.java

public EditorDropTarget3(JEditorPane pane) {
    this.pane = pane;

    // Listen for changes in the enabled property
    pane.addPropertyChangeListener(this);

    // Save the JEditorPane's background color
    backgroundColor = pane.getBackground();

    // Create the DropTarget and register
    // it with the JEditorPane.
    dropTarget = new DropTarget(pane, DnDConstants.ACTION_COPY_OR_MOVE, this, pane.isEnabled(), null);
}

From source file:EditorDropTarget4.java

public EditorDropTarget4(JEditorPane pane) {
    this.pane = pane;

    // Listen for changes in the enabled property
    pane.addPropertyChangeListener(this);

    // Save the JEditorPane's background color
    backgroundColor = pane.getBackground();

    // Create the DropTarget and register
    // it with the JEditorPane.
    dropTarget = new DropTarget(pane, DnDConstants.ACTION_COPY_OR_MOVE, this, pane.isEnabled(), null);
}