import javax.swing.JFrame;Output
import javax.swing.JOptionPane;
public class Inputdialog {
public static void main(String[] args) {
JFrame frame = new JFrame("");
문자열 return = JOptionPane.showInputDialog(
frame, "이름을 입력하세요","Dialog",
JOptionPane.PLAIN_MESSAGE);
System.exit(0);
}
}
import javax.swing.JFrame;Execution:
import javax.swing.JOptionPane;
public class Inputdialog {
public static void main(String[] args) {
JFrame frame = new JFrame("");
개체[] 선택 = {1,2,3,4,5,6};
문자열 return = (문자열) JOptionPane.showInputDialog(
frame, "인덱스 선택",
"대화상자",
JOptionPane.QUESTION_MESSAGE,
null, selection, selection[0]);
System.exit(0);
}
}
ImageIcon icon = new ImageIcon("question.png");Execution:
Object[] 선택 = {1,2,3,4,5,6};
String back = (문자열) JOptionPane.showInputDialog(frame, "색인 선택",
"대화상자",JOptionPane.QUESTION_MESSAGE,
아이콘, 선택, 선택[0]);
Please disable your ad blocker and refresh the window to use this website.