javax.swing.JTextPane.setStyledDocument()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中javax.swing.JTextPane.setStyledDocument()方法的一些代码示例,展示了JTextPane.setStyledDocument()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextPane.setStyledDocument()方法的具体详情如下:
包路径:javax.swing.JTextPane
类名称:JTextPane
方法名:setStyledDocument

JTextPane.setStyledDocument介绍

暂无

代码示例

代码示例来源:origin: org.activecomponents.jadex/jadex-commons-gui

/**
   *  Show a document in this pane.
   */
  public void setStyledDocument(StyledDocument doc)
  {
    super.setStyledDocument(doc);
//        history.add(doc);
//        System.out.println("SD: "+doc);
    if(doc instanceof HTMLDocument)
    {
      ((HTMLDocument)doc).setBase(null);
    }
  }

代码示例来源:origin: zgqq/mah

private void limitInputCharacterNum(JTextPane input) {
  input.setStyledDocument(new StyledDocument(this));
}

代码示例来源:origin: stackoverflow.com

JTextPane p=new JTextPane();
    p.setContentType("text/html");
    p.setStyledDocument(new HTMLDocument());
    frame.getContentPane().add(p);
    p.setText("<html><p>This is some text in a paragraph.</p></html>");
    System.out.println(p.getText());

代码示例来源:origin: stackoverflow.com

ins = new ObjectInputStream(fin);
doc = (DefaultStyledDocument)ins.readObject();
pane.setStyledDocument(doc);
JOptionPane.showMessageDialog(this,"Loaded successfully!!","Success",JOptionPane.INFORMATION_MESSAGE);

代码示例来源:origin: stackoverflow.com

ins = new ObjectInputStream(fin);
doc = (DefaultStyledDocument)ins.readObject();
pane.setStyledDocument(doc);
JOptionPane.showMessageDialog(this,"Loaded successfully!!","Success",JOptionPane.INFORMATION_MESSAGE);

代码示例来源:origin: Vhati/Slipstream-Mod-Manager

textPane.setStyledDocument( doc );

相关文章

JTextPane类方法