Java 在CS客户端做网页连接

bottomTitle = new JLabel("努力工作,认真学习——我是antkingwei");
bottomTitle.setForeground(Color.blue);
panel4.add(bottomTitle);
bottomTitle.addMouseListener(new MouseListener(){

@Override
public void mouseClicked(MouseEvent e) {
// TODO Auto-generated method stub
try {
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler  http://blog.sina.com.cn/jianjunwei1");
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
 

你可能感兴趣的:(java,jlabel,连接网页)