Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 41
  1. #21
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,266
    Rep Power
    25

    Default Re: USerName, Password From Cliet

    Does the server receive the username and password OK? Add a println after they are read (about line 64) to see if they are received.
    If you don't understand my response, don't ignore it, ask a question.

  2. #22
    raj.mscking@gmail.com's Avatar
    raj.mscking@gmail.com is offline Senior Member
    Join Date
    Jan 2012
    Location
    TamilNadu
    Posts
    254
    Rep Power
    3

    Default Re: USerName, Password From Cliet

    Any one can Answer Me!

    is it right?,

    for my problem reason May be

    In my main program i am using MySQL Datadase & ServerSocket

    If i use port number for connect MySQL Datadase server with = 3306,
    shall i use the same for my ServerSocket ?,

    else

    have i connect with another port..,

    (by mistakenly i am using different port no)

    please replay me..,

  3. #23
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,266
    Rep Power
    25

    Default Re: USerName, Password From Cliet

    Make sure your client and server are using the same port.
    Add some println statements to ALL the methods and before and after all the statements that are using sockets so you can see what statements are being executed. Have the server print out the username when it receives it.
    After you verify that the client is sending and the server is receiving, work on the DB code.
    If you don't understand my response, don't ignore it, ask a question.

  4. #24
    raj.mscking@gmail.com's Avatar
    raj.mscking@gmail.com is offline Senior Member
    Join Date
    Jan 2012
    Location
    TamilNadu
    Posts
    254
    Rep Power
    3

    Default Re: USerName, Password From Cliet

    Thank you sir!
    i am checking step-by-step as you said,

    But My doubt is

    my main class use the Mysql database & server socket too,

    while conecting with database
    Java Code:
    Connection conn = (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/payslip", "root", "root");
    i am using the port number of = 3306

    while using ServerSocket
    Java Code:
     server = new ServerSocket(3306);
    i am using the port number of = 3306

    is it right or wrong,
    usig on same program with same port number sir?..,
    Thank you..,

  5. #25
    raj.mscking@gmail.com's Avatar
    raj.mscking@gmail.com is offline Senior Member
    Join Date
    Jan 2012
    Location
    TamilNadu
    Posts
    254
    Rep Power
    3

    Default Re: USerName, Password From Cliet

    Sorry Sir!
    This is time to get out from my lab,
    But.
    help me for clear my above doubt sir,
    Thanking you..,
    Have a Happy Day..,

  6. #26
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,266
    Rep Power
    25

    Default Re: USerName, Password From Cliet

    Did you add the println statements? What was printed? Did the server print out the user name?

    I do not have a DB and can not test that part of your code.
    If you don't understand my response, don't ignore it, ask a question.

  7. #27
    raj.mscking@gmail.com's Avatar
    raj.mscking@gmail.com is offline Senior Member
    Join Date
    Jan 2012
    Location
    TamilNadu
    Posts
    254
    Rep Power
    3

    Question Re: USerName, Password From Cliet

    Nice to meet you again Sir1

    i try use with println .
    But
    "serversocket get freezing"
    it may because of non proper handle of my thread , when i use with GUI only.
    i found this link when seek help with google ServerSocket crash with Thread [Solved] (Sockets and Internet Protocols forum at JavaRanch)
    i too face the same, i don't know how to solve it.
    help me please..,

  8. #28
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,266
    Rep Power
    25

    Default Re: USerName, Password From Cliet

    What is printed out by the println statements you were to add to the code to show where it is executing?
    Where was the code executing when the last thing was printed by the server?
    If you don't understand my response, don't ignore it, ask a question.

  9. #29
    raj.mscking@gmail.com's Avatar
    raj.mscking@gmail.com is offline Senior Member
    Join Date
    Jan 2012
    Location
    TamilNadu
    Posts
    254
    Rep Power
    3

    Default Re: USerName, Password From Cliet

    in the place of "Socket s=ss.accept();" the client only it getting freeze sir
    Java Code:
     ServerSocket ss=new ServerSocket(1030);
                             try
                    {
                        JOptionPane.showMessageDialog(null,"Server is runing");
                   while(true)
               {
                   Socket s=ss.accept();

  10. #30
    raj.mscking@gmail.com's Avatar
    raj.mscking@gmail.com is offline Senior Member
    Join Date
    Jan 2012
    Location
    TamilNadu
    Posts
    254
    Rep Power
    3

    Default Re: USerName, Password From Cliet

    i can get the Server is runing message
    and the next OptionPane is not working sir..,
    Last edited by raj.mscking@gmail.com; 05-02-2012 at 02:02 PM.

  11. #31
    raj.mscking@gmail.com's Avatar
    raj.mscking@gmail.com is offline Senior Member
    Join Date
    Jan 2012
    Location
    TamilNadu
    Posts
    254
    Rep Power
    3

    Default Re: USerName, Password From Cliet

    can you replay me please..,

  12. #32
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,266
    Rep Power
    25

    Default Re: USerName, Password From Cliet

    Add lots of printlns to both the client and the server. Run the code and see what is printed out.
    Does the println after the accept() statement print out? That would mean the client has connected.
    Does the server receive the name from the client at line 61? print it to see.
    If you don't understand my response, don't ignore it, ask a question.

  13. #33
    raj.mscking@gmail.com's Avatar
    raj.mscking@gmail.com is offline Senior Member
    Join Date
    Jan 2012
    Location
    TamilNadu
    Posts
    254
    Rep Power
    3

    Default Re: USerName, Password From Cliet

    ok sir, i am trying..,

  14. #34
    raj.mscking@gmail.com's Avatar
    raj.mscking@gmail.com is offline Senior Member
    Join Date
    Jan 2012
    Location
    TamilNadu
    Posts
    254
    Rep Power
    3

    Default Re: USerName, Password From Cliet

    till getting the user Input
    the server window getting freeze,
    after user enter userame & password,
    while the serversocket accept the user & the server window is normal & again back to freeze

    after getting the connection, the client window also in freeze state sir

    if i try with another user, it repeated from beginning sir..,

    code for server is

    Java Code:
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    
    /*
     * Server.java
     *
     * Created on Apr 28, 2012, 10:52:28 AM
     */
    package test;
    import java.io.*;
    import java.net.*;
    import java.util.Calendar;
    import java.util.Date;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.JOptionPane;
    /**
     *
     * @author
     */
    public class Server extends javax.swing.JFrame {
            /** Creates new form Server */
        public Server() {
            initComponents();
        }
    
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
         */
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
        private void initComponents() {
    
            unam = new javax.swing.JTextField();
            pnam = new javax.swing.JTextField();
            dtte = new javax.swing.JLabel();
    
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowOpened(java.awt.event.WindowEvent evt) {
                    formWindowOpened(evt);
                }
            });
    
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                    .addContainerGap(175, Short.MAX_VALUE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(pnam, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap())
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                            .addComponent(unam, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(86, 86, 86))))
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(dtte, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(231, Short.MAX_VALUE))
            );
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addGap(26, 26, 26)
                            .addComponent(unam, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(35, 35, 35)
                            .addComponent(pnam, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(dtte, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(37, Short.MAX_VALUE))
            );
    
            pack();
        }// </editor-fold>                        
    
    private void formWindowOpened(java.awt.event.WindowEvent evt) {                                  
            try
            {
                         ServerSocket ss=new ServerSocket(1030);
                             try
                    {
                        JOptionPane.showMessageDialog(null,"Server is runing");
                        
                         
                        
                   while(true)
               {
                    JOptionPane.showMessageDialog(null,"true");
                   Socket s=ss.accept();
                   JOptionPane.showMessageDialog(rootPane,"accet");
                   Service a=new Service(s);
                   JOptionPane.showMessageDialog(rootPane,"new service");
                   Thread slaveThread = new Thread(new Service(s));
                   JOptionPane.showMessageDialog(rootPane,"on new thread");
                   slaveThread.start();
                   JOptionPane.showMessageDialog(rootPane," start thread");
               }
                    }
                    catch(Exception e)
                    {
                        System.out.println(e);
                    }
            }
            catch(IOException ex)
            {
                Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null,ex);
            }
    }                                 
    
    /**
         * @param args the command line arguments
         */
        public static void main(String args[]) throws IOException {
            
            /* Set the Nimbus look and feel */
            //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
            /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
             * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
             */
            try {
                for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                    if ("Nimbus".equals(info.getName())) {
                        javax.swing.UIManager.setLookAndFeel(info.getClassName());
                        break;
                    }
                }
            } catch (ClassNotFoundException ex) {
                java.util.logging.Logger.getLogger(Server.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
            } catch (InstantiationException ex) {
                java.util.logging.Logger.getLogger(Server.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
            } catch (IllegalAccessException ex) {
                java.util.logging.Logger.getLogger(Server.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
            } catch (javax.swing.UnsupportedLookAndFeelException ex) {
                java.util.logging.Logger.getLogger(Server.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
            }
            //</editor-fold>
    
            /* Create and display the form */
            java.awt.EventQueue.invokeLater(new Runnable() {
    
                public void run() {
                    new Server().setVisible(true);
                }
            });
        }
        // Variables declaration - do not modify                     
        private javax.swing.JLabel dtte;
        private javax.swing.JTextField pnam;
        private javax.swing.JTextField unam;
        // End of variables declaration                   
    
    public class Service extends Thread 
    {
            private Socket s=null;
        private PrintStream out= null;
        private DataInputStream in=null;
        BufferedReader input=null;
        public Service(Socket t)throws Exception             
            {
                 s=t;
                 out=new PrintStream(s.getOutputStream());
                 in=new DataInputStream(s.getInputStream());
            }
            public void run()
            {
                try
        {
                    BufferedReader input = new BufferedReader(new InputStreamReader(s.getInputStream()));
                    PrintWriter output = new PrintWriter(s.getOutputStream(),true);
                    while(true)
                    {
                    String userName = input.readLine();
                    String password = input.readLine();
                    String getd=input.readLine();
                    unam.setText(userName);
                    pnam.setText(password);
                    dtte.setText(getd);
                      }
        }
                    catch(Exception e)
                    {
                        e.printStackTrace();
                        
                        
                        
                    }
            }
    }
                
                
    
    }


    code for handler is

    Java Code:
    package test;
    
    
    import tcp.*;
    import java.io.*;
    import java.net.*;
    import java.sql.*;
    import test.Server;
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    
    /**
     *
     * @author
     */
    public class Service extends Thread 
    {
            private Socket s=null;
        private PrintStream out= null;
        private DataInputStream in=null;
        BufferedReader input=null;
        public Service(Socket t)throws Exception             
            {
                 s=t;
                 out=new PrintStream(s.getOutputStream());
                 in=new DataInputStream(s.getInputStream());
            }
            public void run()
            {
                try
                  {
                    BufferedReader input = new BufferedReader(new InputStreamReader(s.getInputStream()));
                    PrintWriter output = new PrintWriter(s.getOutputStream(),true);
                    while(true)
                    {
                    String userName = input.readLine();
                    String password = input.readLine();
                    String getd=input.readLine();
                    output.println("You Have LogIn" + userName);
                   
        }
                    }
                    catch(Exception e)
                    {
                        e.printStackTrace();
                        
                        
                        
                    }
            }
    }
    code for client is

    Java Code:
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    
    /*
     * Client.java
     *
     * Created on Apr 28, 2012, 10:58:31 AM
     */
    package test;
    import java.io.*;
    import java.net.*;
    import java.util.Calendar;
    import java.util.Date;
    import javax.swing.JOptionPane;
    /**
     *
     * @author
     */
    public class Client extends javax.swing.JFrame {
    Socket s;
        /** Creates new form Client */
        public Client() {
            initComponents();
        }
           /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
         */
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
        private void initComponents() {
    
            un = new javax.swing.JTextField();
            pw = new javax.swing.JTextField();
            lin = new javax.swing.JButton();
            lo = new javax.swing.JButton();
            jLabel1 = new javax.swing.JLabel();
            jLabel2 = new javax.swing.JLabel();
            jLabel3 = new javax.swing.JLabel();
    
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    
            lin.setBackground(new java.awt.Color(255, 255, 255));
            lin.setText("LogIn");
            lin.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mousePressed(java.awt.event.MouseEvent evt) {
                    linMousePressed(evt);
                }
            });
            lin.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    linActionPerformed(evt);
                }
            });
    
            lo.setBackground(new java.awt.Color(255, 255, 255));
            lo.setText("LogOut");
            lo.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    loActionPerformed(evt);
                }
            });
    
            jLabel1.setFont(new java.awt.Font("Franklin Gothic Medium", 0, 14)); // NOI18N
            jLabel1.setForeground(new java.awt.Color(255, 255, 255));
            jLabel1.setText("UserName");
    
            jLabel2.setFont(new java.awt.Font("Franklin Gothic Medium", 0, 14)); // NOI18N
            jLabel2.setForeground(new java.awt.Color(255, 255, 255));
            jLabel2.setText("PassWord");
    
            jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/test/back11.jpg"))); // NOI18N
    
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(10, 10, 10)
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(layout.createSequentialGroup()
                    .addGap(45, 45, 45)
                    .addComponent(lin))
                .addGroup(layout.createSequentialGroup()
                    .addGap(163, 163, 163)
                    .addComponent(lo))
                .addGroup(layout.createSequentialGroup()
                    .addGap(174, 174, 174)
                    .addComponent(pw, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(layout.createSequentialGroup()
                    .addGap(174, 174, 174)
                    .addComponent(un, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(layout.createSequentialGroup()
                    .addGap(10, 10, 10)
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 310, javax.swing.GroupLayout.PREFERRED_SIZE)
            );
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(81, 81, 81)
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(11, 11, 11)
                    .addComponent(lin))
                .addGroup(layout.createSequentialGroup()
                    .addGap(116, 116, 116)
                    .addComponent(lo))
                .addGroup(layout.createSequentialGroup()
                    .addGap(83, 83, 83)
                    .addComponent(pw, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(layout.createSequentialGroup()
                    .addGap(40, 40, 40)
                    .addComponent(un, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(layout.createSequentialGroup()
                    .addGap(37, 37, 37)
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
            );
    
            pack();
        }// </editor-fold>                        
    
    private void linActionPerformed(java.awt.event.ActionEvent evt) {                                    
    // TODO add your handling code here:
             try
            {
          Socket s=new Socket("192.168.1.8",1030);
          PrintWriter output = new PrintWriter(new OutputStreamWriter(s.getOutputStream()));
          String userName =un.getText();
          output.println(userName);
          JOptionPane.showMessageDialog(rootPane," sent User Name");
          String password =pw.getText();
          output.println(password);
          JOptionPane.showMessageDialog(rootPane, "sent  passw");
          Date dt=Calendar.getInstance().getTime();
          output.println(dt);
          JOptionPane.showMessageDialog(rootPane, "sent  date");
          output.flush();
          JOptionPane.showMessageDialog(rootPane, "compleate output");
          BufferedReader input = new BufferedReader(new InputStreamReader(s.getInputStream()));
          String response = input.readLine();
          JOptionPane.showMessageDialog(rootPane, response);
          output.close();
          JOptionPane.showMessageDialog(rootPane, "test close output");
          input.close();
          JOptionPane.showMessageDialog(rootPane, "test close input");
          s.close();
          JOptionPane.showMessageDialog(rootPane, "test socket closed");
          lo.setEnabled(true);
          lin.setEnabled(false);
           }
            catch (Exception e)
            {
                JOptionPane.showMessageDialog(rootPane, "Server Is Not In Connection");
                
           }
         
    }                                   
    
    private void loActionPerformed(java.awt.event.ActionEvent evt) {                                   
    // TODO add your handling code here:
        lin.setEnabled(true);
        lo.setEnabled(false);
    }                                  
    
    private void linMousePressed(java.awt.event.MouseEvent evt) {                                 
    // TODO add your handling code here:
         
    }                                
    
        /**
         * @param args the command line arguments
         */
        public static void main(String args[]) {
            
                   /* Set the Nimbus look and feel */
            //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
            /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
             * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
             */
            try {
                for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                    if ("Nimbus".equals(info.getName())) {
                        javax.swing.UIManager.setLookAndFeel(info.getClassName());
                        break;
                    }
                }
            } catch (ClassNotFoundException ex) {
                java.util.logging.Logger.getLogger(Client.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
            } catch (InstantiationException ex) {
                java.util.logging.Logger.getLogger(Client.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
            } catch (IllegalAccessException ex) {
                java.util.logging.Logger.getLogger(Client.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
            } catch (javax.swing.UnsupportedLookAndFeelException ex) {
                java.util.logging.Logger.getLogger(Client.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
            }
            //</editor-fold>
    
            /* Create and display the form */
            java.awt.EventQueue.invokeLater(new Runnable() {
    
                public void run() {
                    new Client().setVisible(true);
                }
            });
        }
        // Variables declaration - do not modify                     
        private javax.swing.JLabel jLabel1;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JLabel jLabel3;
        private javax.swing.JButton lin;
        private javax.swing.JButton lo;
        private javax.swing.JTextField pw;
        private javax.swing.JTextField un;
        // End of variables declaration                   
    }


    sir!

    their no data base included sir,

    please check/run and help me sir..,

  15. #35
    raj.mscking@gmail.com's Avatar
    raj.mscking@gmail.com is offline Senior Member
    Join Date
    Jan 2012
    Location
    TamilNadu
    Posts
    254
    Rep Power
    3

    Default Re: USerName, Password From Cliet

    sir!
    if the problem is to handle the thread meas, help me to rectified it please..,

  16. #36
    raj.mscking@gmail.com's Avatar
    raj.mscking@gmail.com is offline Senior Member
    Join Date
    Jan 2012
    Location
    TamilNadu
    Posts
    254
    Rep Power
    3

    Default Re: USerName, Password From Cliet

    i am waiting for your response sir..,

  17. #37
    raj.mscking@gmail.com's Avatar
    raj.mscking@gmail.com is offline Senior Member
    Join Date
    Jan 2012
    Location
    TamilNadu
    Posts
    254
    Rep Power
    3

    Default Re: USerName, Password From Cliet

    Now i read and try by this way sir
    Threads and Swing
    ..,

  18. #38
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,266
    Rep Power
    25

    Default Re: USerName, Password From Cliet

    I do not see any calls to the println method in the code you just posted.
    You MUST add println statements to the code to show where the execution flow is going and to show the values of variables as the code executes. You will not be able to fix the code if you do not debug it and find where the problems are. I am not going to fix any of your code. It is up to you to find the problems and fix them. Adding printlns will hep you find where the problems are.
    If you don't understand my response, don't ignore it, ask a question.

  19. #39
    raj.mscking@gmail.com's Avatar
    raj.mscking@gmail.com is offline Senior Member
    Join Date
    Jan 2012
    Location
    TamilNadu
    Posts
    254
    Rep Power
    3

    Default Re: USerName, Password From Cliet

    sir!
    in my code you said to use println,
    i try using JOptionPane.showMessageDialog(rootPane,"service conecting");
    for showing the status sir..,

    shall i use println once again, instead of JOptionPane.showMessageDialog(this,"message") sir..,

  20. #40
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,266
    Rep Power
    25

    Default Re: USerName, Password From Cliet

    That is up to you. I use printlns because they show a history or what has happened, can be viewed after a test is run and do not clutter the rest of the GUI during a test.

    There are too many lines of code (450+) posted for anyone else to use for testing. If you want help testing you need to make a small, simple program that compiles, executes and shows the problem.
    If you don't understand my response, don't ignore it, ask a question.

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Username And Password
    By razmyasdfg in forum JDBC
    Replies: 9
    Last Post: 05-18-2011, 02:59 PM
  2. New to GUI. Logging in with Password and username
    By slitka in forum New To Java
    Replies: 3
    Last Post: 04-11-2011, 11:39 PM
  3. Encrypt Password and Username
    By hardcorebadger in forum New To Java
    Replies: 5
    Last Post: 01-26-2011, 03:47 PM
  4. how to link url with username and password
    By gb.rashu in forum JavaServer Pages (JSP) and JSTL
    Replies: 13
    Last Post: 08-12-2010, 03:12 PM
  5. JTextFields with username & password.
    By Eric in forum AWT / Swing
    Replies: 2
    Last Post: 07-01-2007, 11:41 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •