using java   create a login page using j frame included username and password as well as a login button. (Refer to image 1)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

using java

 

  1. create a login page using j frame included username and password as well as a login button. (Refer to image 1)
  2. Create a game menu with a image and below the image we have two clickable buttons (play game and instructions) when play game is clicked it proceeds to my trivia game

And embeds them I the codes above into my trivia java game

Here is part of my java code for the trivia game (If you are looking for the full go on YouTube and search bro code java quiz game the full code should be in the comments section

 

import java.awt.event.*;

import java.awt.*;

import javax.swing.*;

 

public class Quiz implements ActionListener {

 

 

  String[] questions = {

      "Factor the equation (X+3)(X+1)?",

      "Which company created Java?",

      

     

     

 

  };

 

 

  String[][] options = {

      { "It cannot be factored", "X^2+4x+3", "2x^2+4x+3", " I don't know" },

      { "Sun Microsystems", "Starbucks", "Microsoft", "Alphabet" },

    

  char[] answers = {

      'B',

      'A',

     

 

  };

 

  char guess;

  char answer;

  int index;

  int correct_guesses = 0;

  int total_questions = questions.length;

  int result;

  int seconds = 10;

 

 

  JFrame frame = new JFrame();

 

  JTextField textfield = new JTextField();

  JTextArea textarea = new JTextArea();

  JButton buttonA = new JButton();

  JButton buttonB = new JButton();

  JButton buttonC = new JButton();

  JButton buttonD = new JButton();

  JLabel answer_labelA = new JLabel();

  JLabel answer_labelB = new JLabel();

  JLabel answer_labelC = new JLabel();

  JLabel answer_labelD = new JLabel();

  JLabel time_label = new JLabel();

  JLabel seconds_left = new JLabel();

  JTextField number_right = new JTextField();

  JTextField percentage = new JTextField();

 

  Timer timer = new Timer(1000, new ActionListener() {

   

    @Override

    public void actionPerformed(ActionEvent e) {

      seconds--;

      seconds_left.setText(String.valueOf(seconds));

      if (seconds <= 0) {

        displayAnswer();

      }

    }

  });

 

 

  public Quiz() {

   

    frame.setTitle("Quiz Time");

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    frame.setSize(650, 650);

    frame.getContentPane().setBackground(new Color(50, 50, 50));

    frame.setLayout(null);

    frame.setResizable(false);

 

  

    textfield.setBounds(0, 0, 650, 50);

    textfield.setBackground(new Color(25, 25, 25));

    textfield.setForeground(new Color(25, 255, 0));

    textfield.setFont(new Font("Ink Free", Font.BOLD, 30));

    textfield.setBorder(BorderFactory.createBevelBorder(1));

    textfield.setHorizontalAlignment(JTextField.CENTER);

    textfield.setEditable(false);

 

 

    textarea.setBounds(0, 50, 650, 50);

    textarea.setLineWrap(true);

    textarea.setWrapStyleWord(true);

    textarea.setBackground(new Color(25, 25, 25));

    textarea.setForeground(new Color(25, 255, 0));

    textarea.setFont(new Font("MV Boli", Font.BOLD, 25));

    textarea.setBorder(BorderFactory.createBevelBorder(1));

    textarea.setEditable(false);

 

  

    buttonA.setBounds(0, 100, 100, 100);

    buttonA.setFont(new Font("MV Boli", Font.BOLD, 35));

    buttonA.setFocusable(false);

    buttonA.addActionListener(this);

    buttonA.setText("A");

 

  

    buttonB.setBounds(0, 200, 100, 100);

    buttonB.setFont(new Font("MV Boli", Font.BOLD, 35));

    buttonB.setFocusable(false);

    buttonB.addActionListener(this);

    buttonB.setText("B");

 

 

    buttonC.setBounds(0, 300, 100, 100);

    buttonC.setFont(new Font("MV Boli", Font.BOLD, 35));

    buttonC.setFocusable(false);

    buttonC.addActionListener(this);

    buttonC.setText("C");

 

   

    buttonD.setBounds(0, 400, 100, 100);

    buttonD.setFont(new Font("MV Boli", Font.BOLD, 35));

    buttonD.setFocusable(false);

    buttonD.addActionListener(this);

    buttonD.setText("D");

 

   

    answer_labelA.setBounds(125, 100, 500, 100);

    answer_labelA.setBackground(new Color(50, 50, 50));

    answer_labelA.setForeground(new Color(25, 255, 0));

    answer_labelA.setFont(new Font("MV Boli", Font.PLAIN, 35));

 

   

 

    answer_labelB.setBounds(125, 200, 500, 100);

    answer_labelB.setBackground(new Color(50, 50, 50));

    answer_labelB.setForeground(new Color(25, 255, 0));

    answer_labelB.setFont(new Font("MV Boli", Font.PLAIN, 35));

 

   

   

LOGIN PAGE
Username
Password
Login
X
Transcribed Image Text:LOGIN PAGE Username Password Login X
Expert Solution
steps

Step by step

Solved in 4 steps with 7 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY