ITeye博客

Java 在CS客户端做网页连接

antkingwei · 2012-02-21 12:10 · Java · 编程语言 · Markdown

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();
}
}

评论(3)

  1. #3 楼 · greatghoul · 2012-02-22 14:42

    antkingwei writes:

    [quote=greatghoul]有木有跨平台的实现方法?[/quote] 什么意思?

    antkingwei writes:

    [quote=greatghoul]有木有跨平台的实现方法?[/quote] 什么意思?

    你这个应该只在windows下面生效吧。

  2. #2 楼 · antkingwei · 2012-02-21 18:34

    greatghoul writes:

    有木有跨平台的实现方法?

    什么意思?

  3. #1 楼 · greatghoul · 2012-02-21 12:14

    有木有跨平台的实现方法?

评论功能维护中,当前仅展示历史评论。