Java Color Value getTextPaneLabel(JScrollPane jsp, Color textColor)

Here you can find the source of getTextPaneLabel(JScrollPane jsp, Color textColor)

Description

get Text Pane Label

License

LGPL

Declaration

public static JTextPane getTextPaneLabel(JScrollPane jsp, Color textColor) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.awt.Color;

import javax.swing.BorderFactory;

import javax.swing.JScrollPane;

import javax.swing.JTextPane;

public class Main {

    public static JTextPane getTextPaneLabel(JScrollPane jsp, Color textColor) {
        JTextPane textPane = new JTextPane();
        textPane.setOpaque(false);//from w w  w  . jav  a2  s .  c om
        textPane.setEditable(false);
        //textPane.setEnabled(false);
        textPane.setDisabledTextColor(textColor);
        if (jsp != null) {
            jsp.setViewportView(textPane);
            jsp.setBorder(BorderFactory.createEmptyBorder());
        }
        return textPane;
    }
}

Related

  1. getRolloverColor()
  2. getSubstanceColor(String name)
  3. getTextColor()
  4. getTextForegroundColor()
  5. getTextInactiveTextColor()
  6. getTitleLineBorderColor()
  7. getUIColor(String code)
  8. getValidFieldColor()
  9. getXpHeaderColor(int type, boolean fill)