Example usage for javax.swing JEditorPane getName

List of usage examples for javax.swing JEditorPane getName

Introduction

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

Prototype

public String getName() 

Source Link

Document

Gets the name of the component.

Usage

From source file:org.netbeans.modules.mongodb.ui.windows.MapReduceTopComponent.java

private void initEditor(JEditorPane epEditor) {
    epEditor.setEditorKit(CloneableEditorSupport.getEditorKit("text/x-javascript"));
    try {/*  w ww.ja  va2s .  co m*/
        FileObject fob = FileUtil.createMemoryFileSystem().getRoot().createData(epEditor.getName(), "js");
        epEditor.getDocument().putProperty(javax.swing.text.Document.StreamDescriptionProperty,
                DataObject.find(fob));
        DialogBinding.bindComponentToFile(fob, 0, 0, epEditor);
    } catch (IOException ex) {
    }
}