Microsoft Word - Programming 632 AssignmentDevelop a JFrame program that will be connected with MySQL database named richfield and allows a user to register his/her personal details that will be...

1 answer below »





Develop a JFrame program that will be connected with MySQL database and
allows a user to register his/her personal details that will be stored in a table named
registration

. (rest of the question can be found in theattached file :) x







Microsoft Word - Programming 632 Assignment Develop a JFrame program that will be connected with MySQL database named richfield and allows a user to register his/her personal details that will be stored in a table named registration. Table fields (Name, Surname, DOB, Address, Gender, Username, Password, Security_Question, Security_Answer) Use appropriate data type for given fields names. Login form The user will be able to register first, before he/she can be able to login. See screenshot below. Use two labels for “Forgotten password” and “New user Signup”. When the user clicks any of the two labels, a form must pop-up to allow the user to either reset the password or enter signup details depending on the label clicked. Your login form must be connected to a database that has the users table. When the user clicks the Login button, the program must verify user username & password to check if they match with those in the users table. If so, a message must pop-up displaying “Welcome with [your name]” . For example, “Welcome Samuel Rametse.” New user Signup form Please note that you have to validate all form fields when the user click submit button to ensure that there are no missing values in all the fields. The message notifying the users about these missing values must be displayed in a dialog box. Use the following security questions: 1. What's your mother’s middle name? 2. Which primary school did you attend? 3. Which year did you finish high school? 4. What is your favourite colour? Once the user is done completing the form correctly, data must be stored inside database table “registration” Clear button will reset all the fields in the form to blank. Exit button will terminate the form Forgotten password form The user is required to provide registered username, security question and security answer which were used the time he/she signed up. The program will compare the supplied information with the one in the database. If the information is correct the pop-up message will appear in the form of a dialog box with user password; otherwise it will show dialog message with “user information not found”. or [35]
Answered Same DayOct 11, 2022

Answer To: Microsoft Word - Programming 632 AssignmentDevelop a JFrame program that will be connected with...

Aditi answered on Oct 12 2022
54 Votes
SOLUTION
     
import javax.swing.*;
 
import java.awt.*;
 
import java.awt.event.*;
 
class MyFrame
 
    extends JFrame
 
    implements ActionListener {
 
 
    private Container c;
 
    private JLabel title;
 
    private JLabel name;
 
private JTextField tname;
 
    private JLabel mno;
 
    private JTextField tmno;
 
    private JLabel gender;
 
    private JRadioButton male;
 
    private JRadioButton female;
 
    private ButtonGroup gengp;
 
    private JLabel dob;
 
    private JComboBox date;
 
    private JComboBox month;
 
    private JComboBox year;
 
    private JLabel add;
 
    private JTextArea tadd;
 
    private JCheckBox term;
 
    private JButton sub;
 
    private JButton reset;
 
    private JTextArea tout;
 
    private JLabel res;
 
    private JTextArea resadd;
 
    private String dates[]
 
        = { "1", "2", "3", "4", "5",
 
            "6", "7", "8", "9", "10",
 
            "11", "12", "13", "14", "15",
 
            "16", "17", "18", "19", "20",
 
            "21", "22", "23", "24", "25",
 
            "26", "27", "28", "29", "30",
 
            "31" };
 
    private String months[]
 
        = { "Jan", "feb", "Mar", "Apr",
 
            "May", "Jun", "July", "Aug",
 
            "Sup", "Oct", "Nov", "Dec" };
 
    private String years[]
 
        = { "1995", "1996", "1997", "1998",
 
            "1999", "2000", "2001", "2002",
 
            "2003", "2004", "2005", "2006",
 
            "2007", "2008", "2009", "2010",
 
            "2011", "2012", "2013", "2014",
 
            "2015", "2016", "2017", "2018",
 
            "2019" };
 
    // constructor, to initialize the components
 
    // with default values.
 
    public MyFrame()
 
    {
 
        setTitle("Registration Form");
 
        setBounds(300, 90, 900, 600);
 
        setDefaultCloseOperation(EXIT_ON_CLOSE);
 
        setResizable(false);
 
        c = getContentPane();
 
        c.setLayout(null);
 
        title = new JLabel("Registration Form");
 
        title.setFont(new Font("Arial", Font.PLAIN, 30));
 
        title.setSize(300, 30);
 
        title.setLocation(300, 30);
 
        c.add(title);
 
        name = new JLabel("Name");
 
        name.setFont(new Font("Arial", Font.PLAIN, 20));
 
        name.setSize(100, 20);
 
        name.setLocation(100, 100);
 
        c.add(name);
 
        tname = new JTextField();
 
        tname.setFont(new Font("Arial", Font.PLAIN, 15));
 
        tname.setSize(190, 20);
 
        tname.setLocation(200,...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here