首页>代码>大一软件Java Swing比赛作品《生活小助手1.2》,MVC思想开发,推荐JDK8,JDK6及以上都能运行>/LifeHelper/src/com/helper/doAction/DoSearch.java
package com.helper.doAction; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.IOException; import com.helper.Swap.Swap; /** * 鎧乞묘콘뇹잿잚 * @author yangtao * */ public class DoSearch implements ActionListener { public void actionPerformed(ActionEvent e) { String s = Swap.searchTextField.getText(); if (s.indexOf(" ") > 0) s = s.replace(" ", "+"); if (Swap.search.equals("baidu")) { try { Runtime.getRuntime().exec("cmd /c start http://www.baidu.com/#wd=" + s+"&rsv_spt=1&issp=1&rsv_bp=0&ie=utf-8&tn=baiduhome_pg&rsv_sug3=2&rsv_sug4=390&rsv_sug2=0&inputT=953"); } catch (IOException e1) { e1.printStackTrace(); } } else if (Swap.search.equals("guge")) { try { Runtime.getRuntime().exec("cmd /c start https://www.google.com.hk/search?q=" + s); } catch (IOException e1) { e1.printStackTrace(); } } else { try { Runtime.getRuntime().exec("cmd /c start http://s.taobao.com/search?q=" + s+"&commend=all&ssid=s5-e&search_type=item&sourceId=tb.index&spm=1.7274553.1997520841.1&initiative_id=tbindexz_20140612"); } catch (IOException e1) { e1.printStackTrace(); } } } }

xp95323 LV15
2023年11月27日
微信网友_5852742079762432 LV6
2022年3月2日
wanglinddad LV55
2022年2月11日
baoxing567 LV9
2021年3月30日
dengdai2018 LV6
2021年2月28日
675104182 LV14
2020年9月22日
yuqm LV17
2020年8月3日
tinbe LV11
2018年12月19日
jasyr1314 LV11
2018年10月20日
Weipeng_ LV14
2018年6月22日

pengkui LV14
2024年11月29日
微笑刺客 LV21
2024年11月22日
杨秀益 LV1
2024年6月17日
Dominick LV14
2024年3月5日
xp95323 LV15
2023年11月27日
xingxing1234 LV10
2023年3月22日
Hsy605 LV9
2022年6月20日
1265260263 LV4
2022年4月8日
微信网友_5852742079762432 LV6
2022年2月28日
wanglinddad LV55
2022年2月9日