projects on cyber cafe

projects on cyber cafe

To accept details from user like name Birth date address contact no etc and store in a database

View Answers

January 24, 2011 at 12:25 PM

Hi Friend,

Try this:

import java.awt.*;
import java.sql.*;
import javax.swing.*;
import java.awt.event.*;
class  FormData{

    public static void main(String[] args){
    JFrame f=new JFrame();
    JLabel label1=new JLabel("Name: ");
    JLabel label2=new JLabel("Date Of Birth: ");
    JLabel label3=new JLabel("Address: ");
    JLabel label4=new JLabel("Contact No: ");
    final JTextField text1=new JTextField(20);
    final JTextField text2=new JTextField(20);
    final JTextField text3=new JTextField(20);
    final JTextField text4=new JTextField(20);
    JButton b=new JButton("Save");
    b.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e){
        String v1=text1.getText();
        String v2=text2.getText();
        String v3=text3.getText();
        int v4=Integer.parseInt(text4.getText());

        try{
           Class.forName("com.mysql.jdbc.Driver");
           Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "root");
           Statement st=con.createStatement();
           int i=st.executeUpdate("insert into data(name,dateOfBirth,address,contactNo) values('"+v1+"','"+v2+"','"+v3+"',"+v4+")");
           JOptionPane.showMessageDialog(null,"Data is inserted successfully");
        }
        catch(Exception ex){
            System.out.println(ex);
        }
        }
    });
        JPanel p=new JPanel(new GridLayout(5,2));
        p.add(label1);
        p.add(text1);
        p.add(label2);
        p.add(text2);
        p.add(label3);
        p.add(text3);
        p.add(label4);
        p.add(text4);
        p.add(b);
        f.add(p);
        f.setVisible(true);
        f.pack();
    }
}

Thanks









Related Tutorials/Questions & Answers:
projects on cyber cafe
projects on cyber cafe  To accept details from user like name Birth date address contact no etc and store in a database   Hi Friend, Visit Here Thanks
projects on cyber cafe
projects on cyber cafe  To accept details from user like name Birth date address contact no etc and store in a database   Hi Friend, Visit Here Thanks
Advertisements
projects on cyber cafe
projects on cyber cafe  To accept details from user like name Birth date address contact no etc and store in a database   Hi Friend, Try this: import java.awt.*; import java.sql.*; import javax.swing.*; import
Cyber Cafe Billing Application in Java
Cyber Cafe Billing Application in Java In this section, we are going to create a bill of Cyber Cafe. Now to create this bill, we have allowed the user... Enter number of hours: 3 *****Cyber Cafe***** Name: Anusmita
Maven dependency for io.github.spring-cyber - cyber-core version 0.0.4 is released. Learn to use cyber-core version 0.0.4 in Maven based Java projects
to use  io.github.spring-cyber - cyber-core version 0.0.4 in Java projects... of cyber-core released The developers of   io.github.spring-cyber - cyber..., the released version of  io.github.spring-cyber - cyber-core library
Maven dependency for io.github.spring-cyber - cyber-core version 0.0.3 is released. Learn to use cyber-core version 0.0.3 in Maven based Java projects
to use  io.github.spring-cyber - cyber-core version 0.0.3 in Java projects... of cyber-core released The developers of   io.github.spring-cyber - cyber..., the released version of  io.github.spring-cyber - cyber-core library
Maven dependency for io.github.spring-cyber - cyber-core version 0.0.2 is released. Learn to use cyber-core version 0.0.2 in Maven based Java projects
to use  io.github.spring-cyber - cyber-core version 0.0.2 in Java projects... of cyber-core released The developers of   io.github.spring-cyber - cyber..., the released version of  io.github.spring-cyber - cyber-core library
Maven dependency for io.github.spring-cyber - cyber-core version 0.0.1 is released. Learn to use cyber-core version 0.0.1 in Maven based Java projects
to use  io.github.spring-cyber - cyber-core version 0.0.1 in Java projects... of cyber-core released The developers of   io.github.spring-cyber - cyber..., the released version of  io.github.spring-cyber - cyber-core library
Cyber Dummy
Cyber Dummy       AJAX code samples and source code Read full DescriptionADS_TO_REPLACE_1
ModuleNotFoundError: No module named 'cafe'
ModuleNotFoundError: No module named 'cafe'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'cafe' How to remove the ModuleNotFoundError: No module named 'cafe' error
ModuleNotFoundError: No module named 'cyber'
ModuleNotFoundError: No module named 'cyber'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'cyber' How to remove the ModuleNotFoundError: No module named 'cyber'
ModuleNotFoundError: No module named 'python-cafe'
ModuleNotFoundError: No module named 'python-cafe'  Hi, My Python... 'python-cafe' How to remove the ModuleNotFoundError: No module named 'python-cafe' error? Thanks   Hi, In your python environment
Maven Repository/Dependency: io.github.spring-cyber | cyber-core
Maven Repository/Dependency of Group ID io.github.spring-cyber and Artifact ID cyber-core. Latest version of io.github.spring-cyber:cyber-core dependencies. # Version Release Date 1
ModuleNotFoundError: No module named 'Cyber-RSA'
ModuleNotFoundError: No module named 'Cyber-RSA'  Hi, My Python... 'Cyber-RSA' How to remove the ModuleNotFoundError: No module named 'Cyber... have to install padas library. You can install Cyber-RSA python with following
aegis school of cyber security
aegis school of cyber security  Hi, I am beginner in Data Science... school of cyber security Try to provide me good examples or tutorials links so that I can learn the topic "aegis school of cyber security". Also tell
ModuleNotFoundError: No module named 'python-cafe-sqlalchemy'
ModuleNotFoundError: No module named 'python-cafe-sqlalchemy'  Hi...: No module named 'python-cafe-sqlalchemy' How to remove the ModuleNotFoundError: No module named 'python-cafe-sqlalchemy' error? Thanks   Hi
ModuleNotFoundError: No module named 'python-cafe-consul'
ModuleNotFoundError: No module named 'python-cafe-consul'  Hi, My... named 'python-cafe-consul' How to remove the ModuleNotFoundError: No module named 'python-cafe-consul' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'python-cafe-sqlalchemy'
ModuleNotFoundError: No module named 'python-cafe-sqlalchemy'  Hi...: No module named 'python-cafe-sqlalchemy' How to remove the ModuleNotFoundError: No module named 'python-cafe-sqlalchemy' error? Thanks   Hi
cyber security data scientist jobs
cyber security data scientist jobs  Hi, I am beginner in Data...: cyber security data scientist jobs Try to provide me good examples or tutorials links so that I can learn the topic "cyber security data scientist jobs"
artificial intelligence cyber security course
artificial intelligence cyber security course  Hi, I am beginner... to learn: artificial intelligence cyber security course Try to provide me good... intelligence cyber security course". Also tell me which is the good training
Cafe and Restaurant Website Design
Cafe and Restaurant Website Design We provide high quality Cafe and restaurant... and development team will help you in developing websites templates for boosting your Cafe... and maintaining websites for cafe and restaurant industry. A website is the virtual
projects
projects  any billing projects in java please send message in the following email id
projects
projects  hi'Sir thank's How to make collage library projects in gui or java code with from design
in projects
java projects
java projects  I am interested to developed the JAVA projects. But I want to some help about java example projects. So give me suggestions to developed the java projects by me.   Please visit the following links: http
Java Projects
Java Projects  Can anyone please share java projects for college submission with source code?? Thanks
java projects
java projects  i have never made any projects in any language. i want to make project in java .i don't know a bit about this .i am familar with java.please show me the path please......   Hi, You can develop
Java Marketing projects
Java Marketing projects  Java Marketing projects
ModuleNotFoundError: No module named 'projects'
ModuleNotFoundError: No module named 'projects'  Hi, My Python... 'projects' How to remove the ModuleNotFoundError: No module named 'projects... to install padas library. You can install projects python with following
ModuleNotFoundError: No module named 'projects'
ModuleNotFoundError: No module named 'projects'  Hi, My Python... 'projects' How to remove the ModuleNotFoundError: No module named 'projects... to install padas library. You can install projects python with following
JAva Projects - Java Magazine
JAva Projects  I need Some Java Projects
Threads in realtime projects
Threads in realtime projects  Explain where we use threads in realtime projects with example
java projects - Java Beginners
java projects  hi, im final yr eng student.plz give me latest java or web related topics for last yr projects
Simple Java Projects
Simple Java Projects  Hi, I am beginner in Java and trying to find Simple Java Projects to learn the different concepts on Java. Can anyone tell me where to get it? Thanks
procedures to create struts projects?
procedures to create struts projects?  i am new to learn in struts. i am start to learn struts program, How to create a struts projects explain with step by step procedure.   Please visit the following link: Struts
python projects data science
python projects data science  Hi, I am beginner in Data Science... projects data science Try to provide me good examples or tutorials links so that I can learn the topic "python projects data science". Also tell me
machine learning projects course
machine learning projects course  Hi, I am beginner in Data Science...: machine learning projects course Try to provide me good examples or tutorials links so that I can learn the topic "machine learning projects course"
python projects for data science
python projects for data science  Hi, I am beginner in Data Science... projects for data science Try to provide me good examples or tutorials links so that I can learn the topic "python projects for data science"
python data science projects
python data science projects  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: python data science projects Try to provide me good examples or tutorials links so that I
data science python projects
data science python projects  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: data science python projects Try to provide me good examples or tutorials links so that I
python data projects
python data projects  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: python data projects Try to provide me good examples or tutorials links so that I can learn
data science with python projects
data science with python projects  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: data science with python projects Try to provide me good examples or tutorials links
ModuleNotFoundError: No module named 'django-projects'
ModuleNotFoundError: No module named 'django-projects'  Hi, My... named 'django-projects' How to remove the ModuleNotFoundError: No module named 'django-projects' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'ensae_projects'
ModuleNotFoundError: No module named 'ensae_projects'  Hi, My... named 'ensae_projects' How to remove the ModuleNotFoundError: No module named 'ensae_projects' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'incolumepy.saj-projects'
ModuleNotFoundError: No module named 'incolumepy.saj-projects'  Hi...: No module named 'incolumepy.saj-projects' How to remove the ModuleNotFoundError: No module named 'incolumepy.saj-projects' error? Thanks   
ModuleNotFoundError: No module named 'mypy-boto3-iot1click-projects'
ModuleNotFoundError: No module named 'mypy-boto3-iot1click-projects'  ...: No module named 'mypy-boto3-iot1click-projects' How to remove the ModuleNotFoundError: No module named 'mypy-boto3-iot1click-projects' error
ModuleNotFoundError: No module named 'PO-Projects'
ModuleNotFoundError: No module named 'PO-Projects'  Hi, My Python... 'PO-Projects' How to remove the ModuleNotFoundError: No module named 'PO-Projects' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'raspberrystem_projects'
ModuleNotFoundError: No module named 'raspberrystem_projects'  Hi...: No module named 'raspberrystem_projects' How to remove the ModuleNotFoundError: No module named 'raspberrystem_projects' error? Thanks   Hi
ModuleNotFoundError: No module named 'bw-projects'
ModuleNotFoundError: No module named 'bw-projects'  Hi, My Python... 'bw-projects' How to remove the ModuleNotFoundError: No module named 'bw-projects' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'cobra-projects'
ModuleNotFoundError: No module named 'cobra-projects'  Hi, My... named 'cobra-projects' How to remove the ModuleNotFoundError: No module named 'cobra-projects' error? Thanks   Hi, In your python

Ads