I want to make: when i click a button after I've given some input it checks & if successful it opens a new window/page i.e I want to create a link....till now I've done
import javax.swing.JOptionPane;
public class inputwindow {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
//String id= "admin";
//String pw= "admin";
String name,pass = "";
name = JOptionPane.showInputDialog("UserName");
pass = JOptionPane.showInputDialog("Password");
//String msg = "Hello " + name ;
//JOptionPane.showMessageDialog(null, msg);
if (name.equals("admin") && pass.equals("admin"))
{
JOptionPane.showMessageDialog(null, "login successful");
}
else {
JOptionPane.showMessageDialog(null,"you are not allowed");
}
}
}
here in the place of "login successful" i want to put somthing that will open a window to be specific I want open a "xyz" web application. for eg: "http://localhost:8080/xyz"......hope I've made myself clear....please suggest..thanks