如果知道java的swing组建中可以加入html标签,这个问题就很简单了,下面来个示例程序:
程序代码:
<BR>import javax.swing.*;<BR>/**<BR>*在swing组建中使用html标签<BR><a href="mailto:*@author" target="_blank" >*@author</A> Eastsun<BR>*/<BR>public class UnderLine extends JFrame{<BR> public UnderLine(){<BR> super("JLabel中显示下划线");<BR> JLabel label =new JLabel("<html><u>下划线</u>,看到没?</html>");<BR> add(label);<BR> setSize(320,240);<BR> }<BR> public static void main(String[] args){<BR> JFrame frame =new UnderLine();<BR> frame.setDefaultCloseOperation(EXIT_ON_CLOSE);<BR> frame.setVisible(true);<BR> }<BR>}





2006-12-26 11:21 


