Java JEditorPane displayEditorPaneWithNoBorderAndTranslucent(JEditorPane editorPane)

Here you can find the source of displayEditorPaneWithNoBorderAndTranslucent(JEditorPane editorPane)

Description

display Editor Pane With No Border And Translucent

License

Open Source License

Declaration

public static void displayEditorPaneWithNoBorderAndTranslucent(JEditorPane editorPane) 

Method Source Code


//package com.java2s;
/*/*w ww  .  jav a 2 s .  c om*/
 * Jt'B Dive Logbook - Electronic dive logbook.
 * 
 * Copyright (C) 2010  Gautier Vanderslyen
 * 
 * Jt'B Dive Logbook is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

import java.awt.Color;
import javax.swing.BorderFactory;

import javax.swing.JEditorPane;

public class Main {
    public static void displayEditorPaneWithNoBorderAndTranslucent(JEditorPane editorPane) {
        editorPane.setOpaque(false);
        editorPane.setBorder(null);
        editorPane.setBorder(BorderFactory.createEmptyBorder());
        editorPane.setBackground(new Color(0, 0, 0, 0));
    }
}

Related

  1. addEditorPaneToOther(JEditorPane[] old, JEditorPane add)
  2. addHyperLinkListener(JEditorPane editorPane)
  3. decorateStyleSheet(JEditorPane editor)
  4. emptyDoc(JEditorPane pane)
  5. enforceJEditorPaneFont(JEditorPane jEditorPane, Font font)
  6. formatEditorPaneAsLabel(JEditorPane editor)
  7. getEditor(JEditorPane editor, String html, int width, Color transparentColor, Font font)