// private String initText = "In"; private void BuildContentPanel() { editorPane = new JEditorPane(); editorPane.SetContentType("text/rtf"); editorPane.AddKeyListener(new NERGUI.InputListener(this)); // defaultAttrSet = ((StyledEditorKit)editorPane.getEditorKit()).getInputAttributes(); StyleConstants.SetFontFamily(defaultAttrSet, "Lucinda Sans"); IDocument doc = new DefaultStyledDocument(); editorPane.SetDocument(doc); try { doc.InsertString(0, initText, defaultAttrSet); } catch (Exception ex) { throw new Exception(ex); } JScrollPane scrollPane = new JScrollPane(editorPane); frame.GetContentPane().Add(scrollPane, BorderLayout.Center); editorPane.SetEditable(true); }
/// <summary> /// Called when the kit is being installed into the /// a JEditorPane. /// </summary> public void install(JEditorPane @c) { }