public static void main(String[] args) throws Exception {
String result = JOptionPane.showInputDialog("请输入用户名和密码,以‘,‘隔开!");
StringTokenizer st = new StringTokenizer(result, ",");
String user = st.nextToken();
String pwd = st.nextToken();
System.out.println(user);
System.out.println(pwd);
}
原文地址:http://5618698.blog.51cto.com/5608698/1636523