SlideShare a Scribd company logo
1 of 4
Download to read offline
This is the code for the above 5 :
public class Input extends JFrame{
JRadioButton employee ;
JRadioButton manager;
JPanel panel;
Button button;
public Input(){
button = new Button("Enter");
employee = new JRadioButton("Employee");
manager = new JRadioButton("Manager");
ButtonGroup group = new ButtonGroup();
group.add(employee);
group.add(manager);
employee.setBounds(50,50,80,50);
manager.setBounds(50,100,80,50);
button.setBounds(130, 200,80,25);
panel = new JPanel();
panel.setLayout(null);
add(panel);
panel.add(employee);
panel.add(manager);
panel.add(button);
employee.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Frame frame = JOptionPane.getFrameForComponent(getParent());
frame.setVisible(true);
frame.setSize(300,300);
}
});
manager.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
}
});
setSize(400,400);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
/*public void actionPerformed(ActionEvent event){
//JOptionPane.showMessageDialog(parent,"Popup");
//System.out.print("action ");
}*/
public static void main(String[] args) {
new Input();
}
}
Solution
This is the code for the above 5 :
public class Input extends JFrame{
JRadioButton employee ;
JRadioButton manager;
JPanel panel;
Button button;
public Input(){
button = new Button("Enter");
employee = new JRadioButton("Employee");
manager = new JRadioButton("Manager");
ButtonGroup group = new ButtonGroup();
group.add(employee);
group.add(manager);
employee.setBounds(50,50,80,50);
manager.setBounds(50,100,80,50);
button.setBounds(130, 200,80,25);
panel = new JPanel();
panel.setLayout(null);
add(panel);
panel.add(employee);
panel.add(manager);
panel.add(button);
employee.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Frame frame = JOptionPane.getFrameForComponent(getParent());
frame.setVisible(true);
frame.setSize(300,300);
}
});
manager.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
}
});
setSize(400,400);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
/*public void actionPerformed(ActionEvent event){
//JOptionPane.showMessageDialog(parent,"Popup");
//System.out.print("action ");
}*/
public static void main(String[] args) {
new Input();
}
}

More Related Content

Similar to This is the code for the above 5 public class Input extends JFram.pdf

Nouveau document texte-_-_
Nouveau document texte-_-_Nouveau document texte-_-_
Nouveau document texte-_-_Mohamed Mlika
 
Programming a guide gui
Programming a guide guiProgramming a guide gui
Programming a guide guiMahmoud Hikmet
 
Tic Tac Toe game with GUI written in java.SolutionAnswerimp.pdf
Tic Tac Toe game with GUI written in java.SolutionAnswerimp.pdfTic Tac Toe game with GUI written in java.SolutionAnswerimp.pdf
Tic Tac Toe game with GUI written in java.SolutionAnswerimp.pdfinfomalad
 
Tic Tac Toe game with GUI please dont copy and paste from google. .pdf
Tic Tac Toe game with GUI please dont copy and paste from google. .pdfTic Tac Toe game with GUI please dont copy and paste from google. .pdf
Tic Tac Toe game with GUI please dont copy and paste from google. .pdfformaxekochi
 
You are to simulate a dispatcher using a priority queue system in C+.pdf
You are to simulate a dispatcher using a priority queue system in C+.pdfYou are to simulate a dispatcher using a priority queue system in C+.pdf
You are to simulate a dispatcher using a priority queue system in C+.pdfJUSTSTYLISH3B2MOHALI
 
10 awt event model
10 awt event model10 awt event model
10 awt event modelBayarkhuu
 
Hello, I need some assistance in writing a java program THAT MUST US.pdf
Hello, I need some assistance in writing a java program THAT MUST US.pdfHello, I need some assistance in writing a java program THAT MUST US.pdf
Hello, I need some assistance in writing a java program THAT MUST US.pdfFashionColZone
 
1) Write a shortsnippetofcodethatcreates a J Panel objectcalled p1, .pdf
1) Write a shortsnippetofcodethatcreates a J Panel objectcalled p1, .pdf1) Write a shortsnippetofcodethatcreates a J Panel objectcalled p1, .pdf
1) Write a shortsnippetofcodethatcreates a J Panel objectcalled p1, .pdfoptokunal1
 
Creating an Uber Clone - Part V.pdf
Creating an Uber Clone - Part V.pdfCreating an Uber Clone - Part V.pdf
Creating an Uber Clone - Part V.pdfShaiAlmog1
 
Enhance the ButtonViewer program so that it prints the time at which t.docx
Enhance the ButtonViewer program so that it prints the time at which t.docxEnhance the ButtonViewer program so that it prints the time at which t.docx
Enhance the ButtonViewer program so that it prints the time at which t.docxtodd401
 
package buttongui; import static com.sun.deploy.config.JREInf.pdf
package buttongui; import static com.sun.deploy.config.JREInf.pdfpackage buttongui; import static com.sun.deploy.config.JREInf.pdf
package buttongui; import static com.sun.deploy.config.JREInf.pdfarjuntiwari586
 
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdfWorking with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdfudit652068
 
PLEASE HELP ME !!IT IS Due Tonight ;(!i have to submit it before.pdf
PLEASE HELP ME !!IT IS Due Tonight ;(!i have to submit it before.pdfPLEASE HELP ME !!IT IS Due Tonight ;(!i have to submit it before.pdf
PLEASE HELP ME !!IT IS Due Tonight ;(!i have to submit it before.pdfmohammedfootwear
 
package employeeType.employee;public class Employee {    private.pdf
package employeeType.employee;public class Employee {    private.pdfpackage employeeType.employee;public class Employee {    private.pdf
package employeeType.employee;public class Employee {    private.pdfsharnapiyush773
 
Whenever I run my application my Game appears with the pict.pdf
Whenever I run my application my Game appears with the pict.pdfWhenever I run my application my Game appears with the pict.pdf
Whenever I run my application my Game appears with the pict.pdfaarthitimesgd
 

Similar to This is the code for the above 5 public class Input extends JFram.pdf (20)

JButton in Java Swing example
JButton in Java Swing example JButton in Java Swing example
JButton in Java Swing example
 
Nouveau document texte-_-_
Nouveau document texte-_-_Nouveau document texte-_-_
Nouveau document texte-_-_
 
Oop lecture8
Oop lecture8Oop lecture8
Oop lecture8
 
Programming a guide gui
Programming a guide guiProgramming a guide gui
Programming a guide gui
 
Tic Tac Toe game with GUI written in java.SolutionAnswerimp.pdf
Tic Tac Toe game with GUI written in java.SolutionAnswerimp.pdfTic Tac Toe game with GUI written in java.SolutionAnswerimp.pdf
Tic Tac Toe game with GUI written in java.SolutionAnswerimp.pdf
 
Oop lecture9
Oop lecture9Oop lecture9
Oop lecture9
 
Tic Tac Toe game with GUI please dont copy and paste from google. .pdf
Tic Tac Toe game with GUI please dont copy and paste from google. .pdfTic Tac Toe game with GUI please dont copy and paste from google. .pdf
Tic Tac Toe game with GUI please dont copy and paste from google. .pdf
 
You are to simulate a dispatcher using a priority queue system in C+.pdf
You are to simulate a dispatcher using a priority queue system in C+.pdfYou are to simulate a dispatcher using a priority queue system in C+.pdf
You are to simulate a dispatcher using a priority queue system in C+.pdf
 
10 awt event model
10 awt event model10 awt event model
10 awt event model
 
Hello, I need some assistance in writing a java program THAT MUST US.pdf
Hello, I need some assistance in writing a java program THAT MUST US.pdfHello, I need some assistance in writing a java program THAT MUST US.pdf
Hello, I need some assistance in writing a java program THAT MUST US.pdf
 
Of class2
Of class2Of class2
Of class2
 
1) Write a shortsnippetofcodethatcreates a J Panel objectcalled p1, .pdf
1) Write a shortsnippetofcodethatcreates a J Panel objectcalled p1, .pdf1) Write a shortsnippetofcodethatcreates a J Panel objectcalled p1, .pdf
1) Write a shortsnippetofcodethatcreates a J Panel objectcalled p1, .pdf
 
Creating an Uber Clone - Part V.pdf
Creating an Uber Clone - Part V.pdfCreating an Uber Clone - Part V.pdf
Creating an Uber Clone - Part V.pdf
 
Enhance the ButtonViewer program so that it prints the time at which t.docx
Enhance the ButtonViewer program so that it prints the time at which t.docxEnhance the ButtonViewer program so that it prints the time at which t.docx
Enhance the ButtonViewer program so that it prints the time at which t.docx
 
package buttongui; import static com.sun.deploy.config.JREInf.pdf
package buttongui; import static com.sun.deploy.config.JREInf.pdfpackage buttongui; import static com.sun.deploy.config.JREInf.pdf
package buttongui; import static com.sun.deploy.config.JREInf.pdf
 
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdfWorking with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
Working with Layout Managers. Notes 1. In part 2, note that the Gam.pdf
 
PLEASE HELP ME !!IT IS Due Tonight ;(!i have to submit it before.pdf
PLEASE HELP ME !!IT IS Due Tonight ;(!i have to submit it before.pdfPLEASE HELP ME !!IT IS Due Tonight ;(!i have to submit it before.pdf
PLEASE HELP ME !!IT IS Due Tonight ;(!i have to submit it before.pdf
 
package employeeType.employee;public class Employee {    private.pdf
package employeeType.employee;public class Employee {    private.pdfpackage employeeType.employee;public class Employee {    private.pdf
package employeeType.employee;public class Employee {    private.pdf
 
Whenever I run my application my Game appears with the pict.pdf
Whenever I run my application my Game appears with the pict.pdfWhenever I run my application my Game appears with the pict.pdf
Whenever I run my application my Game appears with the pict.pdf
 
java2 swing
java2 swingjava2 swing
java2 swing
 

More from DEEPAKSONI562

S = {0,1,2,3,4,5} P(S) be the set of all nonempty subsets of.pdf
 S = {0,1,2,3,4,5} P(S) be the set of all nonempty subsets of.pdf S = {0,1,2,3,4,5} P(S) be the set of all nonempty subsets of.pdf
S = {0,1,2,3,4,5} P(S) be the set of all nonempty subsets of.pdfDEEPAKSONI562
 
The java program that prompts user to enter a string and .pdf
  The java program that prompts user to  enter a string and .pdf  The java program that prompts user to  enter a string and .pdf
The java program that prompts user to enter a string and .pdfDEEPAKSONI562
 
The answer is b, theres no increase in H. .pdf
                     The answer is b, theres no increase in H.        .pdf                     The answer is b, theres no increase in H.        .pdf
The answer is b, theres no increase in H. .pdfDEEPAKSONI562
 
Step1 white ppt with NaCl(aq) indicates Ag+ Step.pdf
                     Step1 white ppt with NaCl(aq) indicates Ag+  Step.pdf                     Step1 white ppt with NaCl(aq) indicates Ag+  Step.pdf
Step1 white ppt with NaCl(aq) indicates Ag+ Step.pdfDEEPAKSONI562
 
Natural rubber is a polymer of isoprene units ; e.pdf
                     Natural rubber is a polymer of isoprene units ; e.pdf                     Natural rubber is a polymer of isoprene units ; e.pdf
Natural rubber is a polymer of isoprene units ; e.pdfDEEPAKSONI562
 
no double displacement reactions can be mixing tw.pdf
                     no double displacement reactions can be mixing tw.pdf                     no double displacement reactions can be mixing tw.pdf
no double displacement reactions can be mixing tw.pdfDEEPAKSONI562
 
using System; using System.Collections.Generic; using System.Lin.pdf
using System; using System.Collections.Generic; using System.Lin.pdfusing System; using System.Collections.Generic; using System.Lin.pdf
using System; using System.Collections.Generic; using System.Lin.pdfDEEPAKSONI562
 
Toxicants may move across biological membranes by all the following .pdf
Toxicants may move across biological membranes by all the following .pdfToxicants may move across biological membranes by all the following .pdf
Toxicants may move across biological membranes by all the following .pdfDEEPAKSONI562
 
time is 18.2yearsdetailed answer i will submit nowSolutionti.pdf
time is 18.2yearsdetailed answer i will submit nowSolutionti.pdftime is 18.2yearsdetailed answer i will submit nowSolutionti.pdf
time is 18.2yearsdetailed answer i will submit nowSolutionti.pdfDEEPAKSONI562
 
Team public class Team {    private String teamId;    priva.pdf
Team public class Team {    private String teamId;    priva.pdfTeam public class Team {    private String teamId;    priva.pdf
Team public class Team {    private String teamId;    priva.pdfDEEPAKSONI562
 
PollinationFertilization1.     Pollination is the transfer of po.pdf
PollinationFertilization1.     Pollination is the transfer of po.pdfPollinationFertilization1.     Pollination is the transfer of po.pdf
PollinationFertilization1.     Pollination is the transfer of po.pdfDEEPAKSONI562
 
Patient.java package A9.toStudents; public class Patient imple.pdf
Patient.java package A9.toStudents; public class Patient imple.pdfPatient.java package A9.toStudents; public class Patient imple.pdf
Patient.java package A9.toStudents; public class Patient imple.pdfDEEPAKSONI562
 
Non financial performance indicators of United Utilities Group PLC. .pdf
Non financial performance indicators of United Utilities Group PLC. .pdfNon financial performance indicators of United Utilities Group PLC. .pdf
Non financial performance indicators of United Utilities Group PLC. .pdfDEEPAKSONI562
 
C) III is correct note the configuration keep un.pdf
                     C) III is correct note the configuration keep un.pdf                     C) III is correct note the configuration keep un.pdf
C) III is correct note the configuration keep un.pdfDEEPAKSONI562
 
LHS =2y+1RHS=-(-2y-1)         =2y+1LHS =RHSy=all the real nu.pdf
LHS =2y+1RHS=-(-2y-1)         =2y+1LHS =RHSy=all the real nu.pdfLHS =2y+1RHS=-(-2y-1)         =2y+1LHS =RHSy=all the real nu.pdf
LHS =2y+1RHS=-(-2y-1)         =2y+1LHS =RHSy=all the real nu.pdfDEEPAKSONI562
 
import com.rogue.roguer.command.CommandHandler; import com.rogue.r.pdf
import com.rogue.roguer.command.CommandHandler; import com.rogue.r.pdfimport com.rogue.roguer.command.CommandHandler; import com.rogue.r.pdf
import com.rogue.roguer.command.CommandHandler; import com.rogue.r.pdfDEEPAKSONI562
 
intervalSolutioninterval.pdf
intervalSolutioninterval.pdfintervalSolutioninterval.pdf
intervalSolutioninterval.pdfDEEPAKSONI562
 
In2O3SolutionIn2O3.pdf
In2O3SolutionIn2O3.pdfIn2O3SolutionIn2O3.pdf
In2O3SolutionIn2O3.pdfDEEPAKSONI562
 
FeCO3 is an ionic compound, composed of the Fe(II)2+ ion and the CO3.pdf
FeCO3 is an ionic compound, composed of the Fe(II)2+ ion and the CO3.pdfFeCO3 is an ionic compound, composed of the Fe(II)2+ ion and the CO3.pdf
FeCO3 is an ionic compound, composed of the Fe(II)2+ ion and the CO3.pdfDEEPAKSONI562
 
D the polar covalent bond within methanol cannot form hydrogen bond .pdf
D the polar covalent bond within methanol cannot form hydrogen bond .pdfD the polar covalent bond within methanol cannot form hydrogen bond .pdf
D the polar covalent bond within methanol cannot form hydrogen bond .pdfDEEPAKSONI562
 

More from DEEPAKSONI562 (20)

S = {0,1,2,3,4,5} P(S) be the set of all nonempty subsets of.pdf
 S = {0,1,2,3,4,5} P(S) be the set of all nonempty subsets of.pdf S = {0,1,2,3,4,5} P(S) be the set of all nonempty subsets of.pdf
S = {0,1,2,3,4,5} P(S) be the set of all nonempty subsets of.pdf
 
The java program that prompts user to enter a string and .pdf
  The java program that prompts user to  enter a string and .pdf  The java program that prompts user to  enter a string and .pdf
The java program that prompts user to enter a string and .pdf
 
The answer is b, theres no increase in H. .pdf
                     The answer is b, theres no increase in H.        .pdf                     The answer is b, theres no increase in H.        .pdf
The answer is b, theres no increase in H. .pdf
 
Step1 white ppt with NaCl(aq) indicates Ag+ Step.pdf
                     Step1 white ppt with NaCl(aq) indicates Ag+  Step.pdf                     Step1 white ppt with NaCl(aq) indicates Ag+  Step.pdf
Step1 white ppt with NaCl(aq) indicates Ag+ Step.pdf
 
Natural rubber is a polymer of isoprene units ; e.pdf
                     Natural rubber is a polymer of isoprene units ; e.pdf                     Natural rubber is a polymer of isoprene units ; e.pdf
Natural rubber is a polymer of isoprene units ; e.pdf
 
no double displacement reactions can be mixing tw.pdf
                     no double displacement reactions can be mixing tw.pdf                     no double displacement reactions can be mixing tw.pdf
no double displacement reactions can be mixing tw.pdf
 
using System; using System.Collections.Generic; using System.Lin.pdf
using System; using System.Collections.Generic; using System.Lin.pdfusing System; using System.Collections.Generic; using System.Lin.pdf
using System; using System.Collections.Generic; using System.Lin.pdf
 
Toxicants may move across biological membranes by all the following .pdf
Toxicants may move across biological membranes by all the following .pdfToxicants may move across biological membranes by all the following .pdf
Toxicants may move across biological membranes by all the following .pdf
 
time is 18.2yearsdetailed answer i will submit nowSolutionti.pdf
time is 18.2yearsdetailed answer i will submit nowSolutionti.pdftime is 18.2yearsdetailed answer i will submit nowSolutionti.pdf
time is 18.2yearsdetailed answer i will submit nowSolutionti.pdf
 
Team public class Team {    private String teamId;    priva.pdf
Team public class Team {    private String teamId;    priva.pdfTeam public class Team {    private String teamId;    priva.pdf
Team public class Team {    private String teamId;    priva.pdf
 
PollinationFertilization1.     Pollination is the transfer of po.pdf
PollinationFertilization1.     Pollination is the transfer of po.pdfPollinationFertilization1.     Pollination is the transfer of po.pdf
PollinationFertilization1.     Pollination is the transfer of po.pdf
 
Patient.java package A9.toStudents; public class Patient imple.pdf
Patient.java package A9.toStudents; public class Patient imple.pdfPatient.java package A9.toStudents; public class Patient imple.pdf
Patient.java package A9.toStudents; public class Patient imple.pdf
 
Non financial performance indicators of United Utilities Group PLC. .pdf
Non financial performance indicators of United Utilities Group PLC. .pdfNon financial performance indicators of United Utilities Group PLC. .pdf
Non financial performance indicators of United Utilities Group PLC. .pdf
 
C) III is correct note the configuration keep un.pdf
                     C) III is correct note the configuration keep un.pdf                     C) III is correct note the configuration keep un.pdf
C) III is correct note the configuration keep un.pdf
 
LHS =2y+1RHS=-(-2y-1)         =2y+1LHS =RHSy=all the real nu.pdf
LHS =2y+1RHS=-(-2y-1)         =2y+1LHS =RHSy=all the real nu.pdfLHS =2y+1RHS=-(-2y-1)         =2y+1LHS =RHSy=all the real nu.pdf
LHS =2y+1RHS=-(-2y-1)         =2y+1LHS =RHSy=all the real nu.pdf
 
import com.rogue.roguer.command.CommandHandler; import com.rogue.r.pdf
import com.rogue.roguer.command.CommandHandler; import com.rogue.r.pdfimport com.rogue.roguer.command.CommandHandler; import com.rogue.r.pdf
import com.rogue.roguer.command.CommandHandler; import com.rogue.r.pdf
 
intervalSolutioninterval.pdf
intervalSolutioninterval.pdfintervalSolutioninterval.pdf
intervalSolutioninterval.pdf
 
In2O3SolutionIn2O3.pdf
In2O3SolutionIn2O3.pdfIn2O3SolutionIn2O3.pdf
In2O3SolutionIn2O3.pdf
 
FeCO3 is an ionic compound, composed of the Fe(II)2+ ion and the CO3.pdf
FeCO3 is an ionic compound, composed of the Fe(II)2+ ion and the CO3.pdfFeCO3 is an ionic compound, composed of the Fe(II)2+ ion and the CO3.pdf
FeCO3 is an ionic compound, composed of the Fe(II)2+ ion and the CO3.pdf
 
D the polar covalent bond within methanol cannot form hydrogen bond .pdf
D the polar covalent bond within methanol cannot form hydrogen bond .pdfD the polar covalent bond within methanol cannot form hydrogen bond .pdf
D the polar covalent bond within methanol cannot form hydrogen bond .pdf
 

Recently uploaded

Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answersdalebeck957
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationNeilDeclaro1
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptxJoelynRubio1
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsNbelano25
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 

Recently uploaded (20)

Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 

This is the code for the above 5 public class Input extends JFram.pdf

  • 1. This is the code for the above 5 : public class Input extends JFrame{ JRadioButton employee ; JRadioButton manager; JPanel panel; Button button; public Input(){ button = new Button("Enter"); employee = new JRadioButton("Employee"); manager = new JRadioButton("Manager"); ButtonGroup group = new ButtonGroup(); group.add(employee); group.add(manager); employee.setBounds(50,50,80,50); manager.setBounds(50,100,80,50); button.setBounds(130, 200,80,25); panel = new JPanel(); panel.setLayout(null); add(panel); panel.add(employee); panel.add(manager); panel.add(button); employee.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { Frame frame = JOptionPane.getFrameForComponent(getParent());
  • 2. frame.setVisible(true); frame.setSize(300,300); } }); manager.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { } }); setSize(400,400); setVisible(true); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } /*public void actionPerformed(ActionEvent event){ //JOptionPane.showMessageDialog(parent,"Popup"); //System.out.print("action "); }*/ public static void main(String[] args) { new Input(); } } Solution This is the code for the above 5 :
  • 3. public class Input extends JFrame{ JRadioButton employee ; JRadioButton manager; JPanel panel; Button button; public Input(){ button = new Button("Enter"); employee = new JRadioButton("Employee"); manager = new JRadioButton("Manager"); ButtonGroup group = new ButtonGroup(); group.add(employee); group.add(manager); employee.setBounds(50,50,80,50); manager.setBounds(50,100,80,50); button.setBounds(130, 200,80,25); panel = new JPanel(); panel.setLayout(null); add(panel); panel.add(employee); panel.add(manager); panel.add(button); employee.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { Frame frame = JOptionPane.getFrameForComponent(getParent()); frame.setVisible(true); frame.setSize(300,300);
  • 4. } }); manager.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { } }); setSize(400,400); setVisible(true); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } /*public void actionPerformed(ActionEvent event){ //JOptionPane.showMessageDialog(parent,"Popup"); //System.out.print("action "); }*/ public static void main(String[] args) { new Input(); } }