Java图形界面

1:导入图形界面方法(输入方法)

import javax.swing.JOptionPane;
1 import javax.swing.JOptionPane;
2 public class test2 {
3     public static void main(String[] args) {
4         String result;
5         result=JOptionPane.showInputDialog(null,"你的学号是?");
6   JOptionPane.showMessageDialog(null, "你好,"+result+"!");
7     }
8 }

2:显示输出

JOptionPane.showMessageDialog();

 

posted @ 2016-11-05 09:23  OVER_AGAIN_THIS  阅读(131)  评论(0编辑  收藏  举报