(Solution) If I Click The "0.Create A New Class." Then, The The Labe Would Be Shown Up In The Same Frame. But I Don't See The Label Whis Is... | Snapessays.com


(Solution) If I click the "0.Create a New Class." then, the the labe would be shown up in the same frame. But I don't see the label whis is...


If I click the "0.Create a New Class." then,

 

the the labe would be shown up in the same frame.( which I attached an image). But I don't see the label whis is "Number of Student: " (I didn't make the JTextField and JButton yet).

 

Can you please figure this out?

 

====================================================

 

import java.awt.*;

 

import javax.swing.*;

 

import java.awt.event.*;

 

public class gradeBook{

 

static JButton btn[]=new JButton[8];

 

static private JFrame frm=new JFrame("Csc 20 gradeBook");

 

static Container contentPane;

 

 

static class Action implements ActionListener{

 

public void actionPerformed(ActionEvent e) {

 

if (e.getSource() == btn[0]) {

 

contentPane.setVisible(false);

 

System.out.println("Say yes");

 

JFrame frm=new JFrame("Csc 20 gradeBook");

 

Container contentPane5=frm.getContentPane();

 

 

JLabel label4=new JLabel("Creat a New Class");

 

 

JPanel panel5=new JPanel();

 

panel5.setLayout(new FlowLayout());

 

panel5.add(label4);

 

 

contentPane5.add(panel5,BorderLayout.NORTH);

 

contentPane5.setVisible(true);

 

 

return;

 

}

 

}

 

}

 

 

 

public static void main(String[] args){

 

frm=new JFrame("Csc 20 gradeBook");

 

frm.setLayout(new BorderLayout());

 

contentPane=frm.getContentPane();

 

ActionListener AL = new Action() ;

 

JLabel label=new JLabel("Use the bottons to below to manage students",SwingConstants.CENTER);

 

JLabel label1=new JLabel("Class Name: ");

 

JLabel label2=new JLabel("Number of Student: ");

 

//Text field

 

JTextField text=new JTextField(5);

 

text.setHorizontalAlignment(4);

 

JTextField text1=new JTextField("0");

 

text.setHorizontalAlignment(4);

 

 

//JPanel1

 

JPanel panel1=new JPanel();

 

panel1.setLayout(new FlowLayout());

 

panel1.add(label);

 

//JPanel2

 

JPanel panel2=new JPanel();

 

panel2.setLayout(new GridLayout(1,4));

 

panel2.add(label1);

 

panel2.add(text);

 

panel2.add(label2);

 

panel2.add(text1);

 

 

btn[0]=new JButton("0.Create a New Class"); btn[1]=new JButton("1.Load Students From"); btn[2]=new JButton("2.Add New Students");

 

btn[3]=new JButton("3.Enter Lab Scores"); btn[4]=new JButton("4. Sort Students"); btn[5]=new JButton("5.View/Delete Students5"); btn[6]=new JButton("6.Backup Students"); btn[7]=new JButton("7.Exit");

 

 

for(int i=0; i

 


Solution details:
STATUS
Answered
QUALITY
Approved
ANSWER RATING

This question was answered on: May 23, 2022

Solution~00021147719985.zip (25.37 KB)


This attachment is locked

Our expert Writers have done this assignment before, you can reorder for a fresh, original and plagiarism-free copy and it will be redone much faster (Deadline assured. Flexible pricing. TurnItIn Report provided)

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
SiteLock

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

May 23, 2022

EXPERT

Tutor

ANSWER RATING

GET INSTANT HELP

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • ■ As a reference for in-depth understanding of the subject.
  • ■ As a source of ideas / reasoning for your own research (if properly referenced)
  • ■ For editing and paraphrasing.

This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

Get Free Price Quote