码迷,mamicode.com
首页 > 其他好文 > 详细

FiveChess笔记

时间:2016-10-14 14:39:10      阅读:111      评论:0      收藏:0      [点我收藏+]

标签:

确认对话框(0是,1否,2取消):(1)在窗体类中:int result = JOptionPane.showConfirmDialog(this, "hello everyone!");

                (2)在类之外:int result = JOptionPane.showConfirmDialog(new JFrame(), "hello everyone!");

                       或int result = JOptionPane.showConfirmDialog(null, "hello everyone!");(使用默认的Frame作为父窗口,此时对话框在屏幕正中)。

输入对话框:String input = JOptionPane.showInputDialog("hello, what is your name?");

消息显示框:JOptionPane.showMessageDialog(new JFrame(), "Hi everyone, my name is shudaye");

FiveChess笔记

标签:

原文地址:http://www.cnblogs.com/quanxi/p/5959915.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!