import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; public class TestClosedOperationDialog extends JFrame implements ActionListener{ private ClosedOperationDialog dialog; private JButton button1; TestClosedOperationDialog(){ super("ClosedOperationDialog‚̃eƒXƒg"); setBounds(150,150,300,200); dialog=new ClosedOperationDialog(); dialog.setLocation(100,100); button1=new JButton("Confirm"); button1.addActionListener(this); getContentPane().setLayout(new GridLayout(1,1)); getContentPane().add(button1); } //------------------------------------------------------------------------ public void actionPerformed(ActionEvent ae){ if ((JButton)ae.getSource()==button1){ int result=dialog.showClosedDialog(this,"ˆÍŒéViewer"); System.out.println("result=" + result); } } //------------------------------------------------------------------------ public static void main(String[] args){ TestClosedOperationDialog frame=new TestClosedOperationDialog(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } }