Java Swing JOptionPane 받는 .
밍 는 많 므 따 면 . 냥 만 .
¶
- 만면 문 . -_-+
~cpp import javax.swing.JOptionPane; public class InputOutputExample { private String input = ""; private String output = ""; public InputOutputExample() { // Constructor // input string input = inputDialogbox("Enter the first word : "); output += input; // add text to String instance; input = inputDialogbox("Enter the second word : "); output += input; // add text to String instance; outputDialogbox(output); } public static void main(String[] args) { InputOutputExample example = new InputOutputExample(); } public String inputDialogbox(String text) { // Shows a question-message dialog requesting // input from the user parented to parentComponent. return JOptionPane.showInputDialog(null, text); } public void outputDialogbox(String message) { // Brings up an information-message dialog titled "Message". JOptionPane.showMessageDialog(null, message); } }