Javacode01

Posted by BY Blog on March 26, 2019

JavaDemo01

弹出对话框

package cn.landv.javademo;
import javax.swing.*;
import java.awt.*;
public class TestFrame {
    public TestFrame() {
    }
    public static void main(String[] args) {
        Frame f =new Frame("fuck this java");
        f.setBackground(Color.BLUE);
        f.setSize(300,150);
        f.setVisible(true);
        String s =JOptionPane.showInputDialog(null, "这是一个可供用户输入信息的对话框");
        f.setTitle(s);
    }
}