Page 766 - 3-2
P. 766

this.setLayout(new GridLayout(1,2));


                            this.add(btn1);
                            this.add(btn2);


                            this.setSize(360, 300);
                            this.setVisible(true);


                            btn1.addActionListener(this);
                            btn2.addActionListener(this);


                    btn1.setFont(new Font("Serif", Font.BOLD, 50));
                    btn2.setFont(new Font("Serif", Font.BOLD, 50));


                    GraphicsEnvironment env =GraphicsEnvironment.getLocalGraphicsEnvironment();
                    this.setMaximizedBounds(env.getMaximumWindowBounds());
                    this.setExtendedState(this.getExtendedState() | this.MAXIMIZED_BOTH);


                            this.addWindowListener(new WinExam());


                    }


                    public class WinExam extends WindowAdapter
                    {
                            @Override
                             public void windowClosing(WindowEvent e)
                             {
                                    System.exit(0);
                             }
                    }


                    public static void main(String[] args)
                    {
                            (new ServerTest()).Server();
                    }
                    @Override
                    public void actionPerformed(ActionEvent e)
                    {


                            if (e.getSource().equals(btn1))
                            {


                                    int how = JOptionPane.showConfirmDialog(this,"  대출하시겠습니까?","       대출",
            JOptionPane.YES_NO_OPTION);


                                                         - 766 -
   761   762   763   764   765   766   767   768   769   770   771