简单的网络邮箱抓取工具(附源码) (二)
nel.add(b1);
panel.add(b2);
frame.getContentPane().add(panel, BorderLayout.NORTH);
frame.getContentPane().add(jScrollPane1, BorderLayout.CENTER);
frame.setSize(300, 400);
frame.pack();
frame.setVisible(true);
Dimension winSize = Toolkit.getDefaultToolkit().getScreenSize();
frame.setLocation((winSize.width - frame.getWidth()) / 2,
(winSize.height - frame.getHeight()) / 2);
frame.setAlwaysOnTop(true);
return this;
}
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException,
UnsupportedLookAndFeelException {
// TODO Auto-generated method stub
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
new MainFrm().into().systemTray();
}
@SuppressWarnings({ "unchecked", "deprecation", "static-access" })
@Override
public void actionPerformed(ActionEvent e) {
if ("提取邮箱".equals(e.getActionCommand())) {
count=1;
t1.setText("");
// get("http://dzh.mop.com/whbm/20060109/4/lSgg8I6063c68aS3.shtml");
String http = "";
int combo = (comb.getSelectedIndex());
switch (combo) {
case 0:
http = "http://www.baidu.com/s wd=";
break;
case 1:
http = "http://www.google.com.hk/search num=50&q=";
break;
case 2:
http = "http://www.yahoo.cn/s q=";
break;
case 3:
http = "http://cn.bing.com/search q=";
break;
case 4:
http = "http://www.sogou.com/web query=";
break;
default:
http = "http://www.baidu.com/s wd=";
break;
}
final List