JOptionPane也可以在applet中显示的啊?有什么问题吗?
解决方案 »
- new Date()出现的时间差问题
- 请问要用exlipse开发servlet和jsp要装什么插件啊??
- classloader问题,高分!!!急,在线
- 一个JAVA题,编译不过去,请高手看看,我想是环境变量的问题,请答复!
- 散分,顶者都有分! 下班结贴!
- jBuilder8 的project能不能打包成安装程序,如果不能又如何实现?
- 高分求下载websphere网址
- 局域网传输文件
- ★★★JComboBox问题
- 关于Java获取超链接正则表达式的问题
- 集思广益:java_sqlServer ,b/s、c/s有经验的朋友进
- 关于iPlanet Web Server在Win2000Server上配置运行的问题?(在线等待,解决即给分,请进!)
ActionListener
Button butt_ok = new Button(" ok ");
Dialog dlgConnect = new Dialog(this, "警告信息", true);
public void _actionNOte(String note){
dlgConnect.setSize(260, 120);
dlgConnect.setLocation((this.getBounds().x + this.getBounds().width / 2) - 150,
(this.getBounds().y + this.getBounds().height / 2) - 150);
dlgConnect.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent _we)
{
_we.getWindow().dispose();
dlgConnect.removeAll();
System.gc();
}
});
//Label lblUName = new Label(note);
Label lblUName = new Label(note);
butt_ok.addActionListener(this);
butt_ok.setActionCommand("10");
dlgConnect.setLayout(new GridLayout(2, 1, 1, 2));
Panel panel2 = new Panel();
Panel panel3 = new Panel();
panel2.add(lblUName);
panel3.add(butt_ok);
dlgConnect.add(panel2);
dlgConnect.add(panel3);
dlgConnect.setVisible(true);
}
可以参考:http://java.sun.com/products/plugin/