Skip to content

Instantly share code, notes, and snippets.

@odinsbane
Created May 26, 2017 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odinsbane/2646274ab9f7393da388a2384eab2ec6 to your computer and use it in GitHub Desktop.
Save odinsbane/2646274ab9f7393da388a2384eab2ec6 to your computer and use it in GitHub Desktop.
import javax.swing.*;
import java.awt.*;
public class OptionOptions{
public static void main(String[] args){
while(true){
String[] options = {"OK", "NOT OK"};
String message = "What";
int n = JOptionPane.showOptionDialog(null, message, "Nytt smycke", JOptionPane.OK_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE, null, options, "OK");
System.out.println(n);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment