开发者

a joptionpane with a textbox and a button

I want a joptionpane with a textbox and a button and when click on the button perform my own fun开发者_如何学Pythonctions


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

Output :

a joptionpane with a textbox and a button


Maybe you just want a modal JDialog with a JLabel or a JTextArea and a JButton.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜