swing点击按钮 打开一个浏览器窗口的方法

RolloverButton ib1=new RolloverButton("百度",BusinessPluginRes.getImageIcon(BusinessPluginRes.ESTATERES));

 ib1.addActionListener(new ActionListener() {
  
  @Override
  public void actionPerformed(ActionEvent e) {
   Runtime rt=Runtime.getRuntime();
   try {
    Process proc=rt.exec("C:\\Program Files\\Internet Explorer\\iexplore.exe www.baidu.com");
   } catch (IOException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
   }
  }
 });

I'm falling off the sky all alone.The courage inside is gonna break the fall. Nothing can dim my light within. I am That I am 程序 = 数据结构 + 算法
原文地址:https://www.cnblogs.com/IamThat/p/2955245.html