JTextArea helparea = new JTextArea();helparea.append("\tJRE下载地址: www.sun.com (SUN官方网站)\n\n");把www.sun.com设置成超链接
解决方案 »
- 关于myeclispe中使用泛型报错的问题
- 一个新手的看法:目前坛子里提问帖还是问题多多
- 如果用Hibernate的createSQLQuery方法执行SQL数据定义语句
- order by 的问题
- 如何得到本周的周一和周七的日期?
- J2EE/CORBAR/DCOM/XML之间是什么关系
- 有没有免费的jsp debug和javascript debug的eclipse插件?告知名称,下载地址马上给100分!
- java传参数问题
- classpath问题
- 讨论:foxpro程序,和一个java(web)项目的数据互通
- hibernate 批量更新时为什么只更新最后一条记录呢?
- JDBC操作主从表事务问题
超链接实现了。可是怎么设置它里面的字呢。让它多行显示
就像我注释掉的一样。实现多行显示非超链接的文字 JEditorPane jEditorPane = new JEditorPane();
jEditorPane.setEditable(false);
jEditorPane.setContentType("text/html");
jEditorPane.setText("<html><body><a href=http://www.baidu.com>www.baidu.com</a></body></html>");
// jEditorPane.setText("\n开发者:\n");
// jEditorPane.setText("\t曲金鑫\n\n");
// jEditorPane.setText("版本号:\n");
// jEditorPane.setText("\t<1.0>版本\n\n");
// jEditorPane.setText("数据库:\n" );
// jEditorPane.setText("\t本系统采用的是mysql数据库\n");
// jEditorPane.setText("\t其中.sql脚本随软件一起携带,保存在db文件夹下。\n");
你要把那段话拼起来,然后再setText
里面明明有《html》《/html》标签。真。到分了。笨到家了。大家见笑咯