1

テキストボックスとボタンを備えたjoptionpaneが必要で、ボタンをクリックすると独自の機能を実行します

4

2 に答える 2

5
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.life.java.so.questions;

import javax.swing.JOptionPane;

/**
 *
 * @author Jigar
 */
public class InputDialog {
    public static void main(String[] args) {
        String input = JOptionPane.showInputDialog("Enter Input:");
        System.out.println(input);
    }
}

出力:

代替テキスト

于 2011-01-05T09:03:30.707 に答える
0

JLabel または JTextArea と JButton を持つモーダル JDialog が必要な場合もあります。

于 2011-01-05T08:49:52.583 に答える