本文整理了Java中javax.swing.JTextPane.setStyledDocument()
方法的一些代码示例,展示了JTextPane.setStyledDocument()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextPane.setStyledDocument()
方法的具体详情如下:
包路径:javax.swing.JTextPane
类名称: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 );
内容来源于网络,如有侵权,请联系作者删除!