使用JLabel进行显示文本
JLabel jl = new JLabel("你好");
或者设置文本组件不可以编辑
JTextArea text = new JTextArea(); text.setEditable(false);