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); } }