- import javax.swing.*;
- import java.awt.event.*;
- class TestJDialog
- {
- public static void main(String[] args)
- {
- JOptionPane.showMessageDialog(null,"程序开始启动");
- final JFrame f = new JFrame("TestJDialog");//要被内置类访问所以定义成final
- f.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
复制代码 Container c = f.getContentPane();这一句是啥意思 啊
|
|