CompactLuxuryFan got it.
Essentially the window prompt will ask for an input, it checks it against a series of IF statements and when it finds the right one it launches the web browser and goes to a specific URL.
But in my test it’s never satisfying the IF conditions and always triggering ELSE. Field1.getText() is returning the field input. //Including imgur link for easier visual : //pastebin link:
//Omitting JFtextfield/frame building code.
{
String input = field1.getText();
if(ae.getActionCommand().equals(“Reboot”)) //button is labeled “Reboot”
if (input == “9") { //inputting 9 into field // SHOULD BE if (input.equals(“9")) {
try {
Desktop desktop = java.awt.Desktop.getDesktop();
URI oURL = new URI(“http://www.google.com”);
desktop.browse(oURL);
} catch (Exception e) {
e.printStackTrace();
}
}
else { System.out.println(“Check camera name”);}
}
}