Example usage for javax.swing JEditorPane getAccessibleContext

List of usage examples for javax.swing JEditorPane getAccessibleContext

Introduction

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

Prototype

@BeanProperty(bound = false)
public AccessibleContext getAccessibleContext() 

Source Link

Document

Gets the AccessibleContext associated with this JEditorPane.

Usage

From source file:Main.java

public static void main(final String args[]) {
    JFrame frame = new JFrame("EditorPane Example");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    try {// w  w w. j  a  v a2 s. c  o  m
        JEditorPane editorPane = new JEditorPane("http://www.java2s.com");
        editorPane.setEditable(false);
        AccessibleContext context = editorPane.getAccessibleContext();

        JScrollPane scrollPane = new JScrollPane(editorPane);
        frame.add(scrollPane);
    } catch (IOException e) {
        System.err.println("Unable to load: " + e);
    }

    frame.setSize(640, 480);
    frame.setVisible(true);
}