....swing.text.BadLocationException;import javax.swing.text.SimpleAttributeSet;import javax.swing.text.StyleConstants;import javax.swing.text.StyledDocument; /*** JTextPane的例子,模拟聊天客户端,演示了为每段文字设置字体、字号、样式、颜色、背景色和插入图片功能*...
...import javax.swing.text.Document;import javax.swing.text.SimpleAttributeSet;import javax.swing.text.StyleConstants; public class ChatRoom{
...rt javax.swing.text.Document; import javax.swing.text.SimpleAttributeSet; import javax.swing.text.StyleConstants; import java.io.*; import java.net.InetAddress; import java.net.Socket; public class ChatTC...