*/
Know a good article or link that we're missing? Submit it!
*/

View java\java\bin\manoveg\client\CDialogBox16.java

networking authentication program 1.0

Submitted By: manoveg
Rating: (Not rated) (Rate It)


package client;
import java.awt.*;
import java.util.*;
import java.sql.*;
import java.io.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;


class CDialogBox16 extends Dialog implements ActionListener
{
 String msg="";
 String actionc="";
int counter;
 CDialogBox16(Frame parent , String title, String msg1,int count)
 {
  super(parent, title , false);
  msg=msg1;
counter=count;
  setLayout(new FlowLayout(FlowLayout.LEFT));
  setSize(300,300);
  Button Ok = new Button("OK");
  add(Ok);
 
  Ok.addActionListener(this);
 
 }

 public void actionPerformed(ActionEvent ae1)
 {
  actionc=ae1.getActionCommand();
  if(actionc.equals("OK"))
  {
    if(counter<3)
    {
     CFrontEnd c1 = new CFrontEnd();
     c1.setVisible(true);
     this.dispose();
    }

else
{
  System.exit(0);
   dispose();
}
  }

   
  }

 public void paint(Graphics g)
 {
  g.drawString(msg,10,170);
  }
}

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.