SlideShare a Scribd company logo
1 of 3
Download to read offline
(java) eclipse Please:
Develop an application that implements a prototype user interface for composing an email
message. The application should have text fields for the To, Cc, and Bcc address lists and subject
line, and one for the message body. Include a button labeled Send. When the send button is
pushed, the program should print the contents of all fields to standard output using println
statements. I need the send button to work.
Solution
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Email {
private JFrame mainFrame;
private JPanel controlPanel;
private JLabel output;
public Email(){
createForm();
}
public static void main(String[] args){
Email emailprog = new Email();
emailprog.sendButton();
}
private void createForm(){
mainFrame = new JFrame("Email");
mainFrame.setSize(600,600);
mainFrame.setLayout(new GridLayout(2,2));
mainFrame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent windowEvent){
System.exit(0);
}
});
output = new JLabel("Output: ");
controlPanel = new JPanel();
controlPanel.setLayout(new GridLayout(10,2));
mainFrame.add(controlPanel);
mainFrame.add(output);
mainFrame.setVisible(true);
}
private void sendButton(){
JLabel to = new JLabel("To: ");
JLabel cc = new JLabel("Cc: ");
JLabel bcc = new JLabel("Bcc: ");
JLabel subject = new JLabel("Subject: ");
JLabel msg = new JLabel("Message: ");
final JTextField toText = new JTextField(50);
final JTextField ccText = new JTextField(50);
final JTextField bccText = new JTextField(50);
final JTextArea subjectText = new JTextArea(10,50);
final JTextArea msgText = new JTextArea(20,50);
JButton send = new JButton("SEND");
send.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String data = "To " + toText.getText() + "
Cc " + ccText.getText() + "
Bcc " + bccText.getText() + "
Subject " + subjectText.getText() + "
Message " + msgText.getText();
output.setText(""+data+"");
}
});
controlPanel.add(to);
controlPanel.add(toText);
controlPanel.add(cc);
controlPanel.add(ccText);
controlPanel.add(bcc);
controlPanel.add(bccText);
controlPanel.add(subject);
controlPanel.add(subjectText);
controlPanel.add(msg);
controlPanel.add(msgText);
controlPanel.add(send);
mainFrame.setVisible(true);
}
}

More Related Content

Similar to (java) eclipse PleaseDevelop an application that implements a pro.pdf

香港六合彩 » SlideShare
香港六合彩 » SlideShare香港六合彩 » SlideShare
香港六合彩 » SlideSharebiyu
 
Baocao Web Tech Java Mail
Baocao Web Tech Java MailBaocao Web Tech Java Mail
Baocao Web Tech Java Mailxicot
 
Asp.Net 2.0 Presentation
Asp.Net 2.0 PresentationAsp.Net 2.0 Presentation
Asp.Net 2.0 Presentationsasidhar
 
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
 
Object Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ ExamsObject Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ ExamsMuhammadTalha436
 
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSencha
 
Ways to Set Focus on an Input Field After Rendering in React.pptx
Ways to Set Focus on an Input Field After Rendering in React.pptxWays to Set Focus on an Input Field After Rendering in React.pptx
Ways to Set Focus on an Input Field After Rendering in React.pptxBOSC Tech Labs
 
Design a Windows Desktop application and write the code that will exe.pdf
Design a Windows Desktop application and write the code that will exe.pdfDesign a Windows Desktop application and write the code that will exe.pdf
Design a Windows Desktop application and write the code that will exe.pdfFootageetoffe16
 
Working with the Calculator program Once imported run the.pdf
Working with the Calculator program Once imported  run the.pdfWorking with the Calculator program Once imported  run the.pdf
Working with the Calculator program Once imported run the.pdficonsystemsslm
 
Modify the Total program so that it writes the values in two columns.pdf
Modify the Total program so that it writes the values in two columns.pdfModify the Total program so that it writes the values in two columns.pdf
Modify the Total program so that it writes the values in two columns.pdfsaxenaavnish1
 
JDBC (JAVA Database Connectivity)
JDBC (JAVA Database Connectivity)JDBC (JAVA Database Connectivity)
JDBC (JAVA Database Connectivity)HimanshiSingh71
 

Similar to (java) eclipse PleaseDevelop an application that implements a pro.pdf (20)

香港六合彩 » SlideShare
香港六合彩 » SlideShare香港六合彩 » SlideShare
香港六合彩 » SlideShare
 
Baocao Web Tech Java Mail
Baocao Web Tech Java MailBaocao Web Tech Java Mail
Baocao Web Tech Java Mail
 
Asp.Net 2.0 Presentation
Asp.Net 2.0 PresentationAsp.Net 2.0 Presentation
Asp.Net 2.0 Presentation
 
Applet progming
Applet progmingApplet progming
Applet progming
 
Ios - Introduction to platform & SDK
Ios - Introduction to platform & SDKIos - Introduction to platform & SDK
Ios - Introduction to platform & SDK
 
CS2309 JAVA LAB MANUAL
CS2309 JAVA LAB MANUALCS2309 JAVA LAB MANUAL
CS2309 JAVA LAB MANUAL
 
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
 
Object Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ ExamsObject Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ Exams
 
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
 
Ways to Set Focus on an Input Field After Rendering in React.pptx
Ways to Set Focus on an Input Field After Rendering in React.pptxWays to Set Focus on an Input Field After Rendering in React.pptx
Ways to Set Focus on an Input Field After Rendering in React.pptx
 
Design a Windows Desktop application and write the code that will exe.pdf
Design a Windows Desktop application and write the code that will exe.pdfDesign a Windows Desktop application and write the code that will exe.pdf
Design a Windows Desktop application and write the code that will exe.pdf
 
Unit 7 Java
Unit 7 JavaUnit 7 Java
Unit 7 Java
 
Working with the Calculator program Once imported run the.pdf
Working with the Calculator program Once imported  run the.pdfWorking with the Calculator program Once imported  run the.pdf
Working with the Calculator program Once imported run the.pdf
 
Modify the Total program so that it writes the values in two columns.pdf
Modify the Total program so that it writes the values in two columns.pdfModify the Total program so that it writes the values in two columns.pdf
Modify the Total program so that it writes the values in two columns.pdf
 
JDBC (JAVA Database Connectivity)
JDBC (JAVA Database Connectivity)JDBC (JAVA Database Connectivity)
JDBC (JAVA Database Connectivity)
 
ajax_pdf
ajax_pdfajax_pdf
ajax_pdf
 
ajax_pdf
ajax_pdfajax_pdf
ajax_pdf
 
Javascript
JavascriptJavascript
Javascript
 
Smart material - Unit 3 (2).pdf
Smart material - Unit 3 (2).pdfSmart material - Unit 3 (2).pdf
Smart material - Unit 3 (2).pdf
 
Smart material - Unit 3 (1).pdf
Smart material - Unit 3 (1).pdfSmart material - Unit 3 (1).pdf
Smart material - Unit 3 (1).pdf
 

More from aroraopticals15

For a given H0 and level of significance, if you reject the H0 for a.pdf
For a given H0 and level of significance, if you reject the H0 for a.pdfFor a given H0 and level of significance, if you reject the H0 for a.pdf
For a given H0 and level of significance, if you reject the H0 for a.pdfaroraopticals15
 
Find all elements of our ring R that have norm 1. Show that no elemen.pdf
Find all elements of our ring R that have norm 1. Show that no elemen.pdfFind all elements of our ring R that have norm 1. Show that no elemen.pdf
Find all elements of our ring R that have norm 1. Show that no elemen.pdfaroraopticals15
 
Evaluate the decision to have a computer usage policy and the potent.pdf
Evaluate the decision to have a computer usage policy and the potent.pdfEvaluate the decision to have a computer usage policy and the potent.pdf
Evaluate the decision to have a computer usage policy and the potent.pdfaroraopticals15
 
At a sudden contraction in a pipe the diameter changes from D_1 to D_.pdf
At a sudden contraction in a pipe the diameter changes from D_1 to D_.pdfAt a sudden contraction in a pipe the diameter changes from D_1 to D_.pdf
At a sudden contraction in a pipe the diameter changes from D_1 to D_.pdfaroraopticals15
 
Above is a trace depicting mechanical activity of frog heart. A stud.pdf
Above is a trace depicting mechanical activity of frog heart. A stud.pdfAbove is a trace depicting mechanical activity of frog heart. A stud.pdf
Above is a trace depicting mechanical activity of frog heart. A stud.pdfaroraopticals15
 
A gymnosperm, such as Juniperus virginiana, that produces female con.pdf
A gymnosperm, such as Juniperus virginiana, that produces female con.pdfA gymnosperm, such as Juniperus virginiana, that produces female con.pdf
A gymnosperm, such as Juniperus virginiana, that produces female con.pdfaroraopticals15
 
Write short descriptive answer to the following questions Discuss wh.pdf
Write short descriptive answer to the following questions  Discuss wh.pdfWrite short descriptive answer to the following questions  Discuss wh.pdf
Write short descriptive answer to the following questions Discuss wh.pdfaroraopticals15
 
Why should anyone else care about what I do with my sewage on my own .pdf
Why should anyone else care about what I do with my sewage on my own .pdfWhy should anyone else care about what I do with my sewage on my own .pdf
Why should anyone else care about what I do with my sewage on my own .pdfaroraopticals15
 
Why do viral particles, zymosan on fungi, endotoxin (LPS) from gram .pdf
Why do viral particles, zymosan on fungi, endotoxin (LPS) from gram .pdfWhy do viral particles, zymosan on fungi, endotoxin (LPS) from gram .pdf
Why do viral particles, zymosan on fungi, endotoxin (LPS) from gram .pdfaroraopticals15
 
Which of the following used historicalcomparative methods in their .pdf
Which of the following used historicalcomparative methods in their .pdfWhich of the following used historicalcomparative methods in their .pdf
Which of the following used historicalcomparative methods in their .pdfaroraopticals15
 
Which of following is not a class of the phylum platyhelminthes Tre.pdf
Which of following is not a class of the phylum platyhelminthes  Tre.pdfWhich of following is not a class of the phylum platyhelminthes  Tre.pdf
Which of following is not a class of the phylum platyhelminthes Tre.pdfaroraopticals15
 
What is wrong with this code Please fix.code#include stdio.h.pdf
What is wrong with this code Please fix.code#include stdio.h.pdfWhat is wrong with this code Please fix.code#include stdio.h.pdf
What is wrong with this code Please fix.code#include stdio.h.pdfaroraopticals15
 
What are two ways that meiosis could produce gametes that contai.pdf
What are two ways that meiosis could produce gametes that contai.pdfWhat are two ways that meiosis could produce gametes that contai.pdf
What are two ways that meiosis could produce gametes that contai.pdfaroraopticals15
 
what is the process in society that made this change to advertising .pdf
what is the process in society that made this change to advertising .pdfwhat is the process in society that made this change to advertising .pdf
what is the process in society that made this change to advertising .pdfaroraopticals15
 
What is the best way to go about designing an Android AppSoluti.pdf
What is the best way to go about designing an Android AppSoluti.pdfWhat is the best way to go about designing an Android AppSoluti.pdf
What is the best way to go about designing an Android AppSoluti.pdfaroraopticals15
 
Use the following word bank to complete the numbers 51-100. Acoeloma.pdf
Use the following word bank to complete the numbers 51-100.  Acoeloma.pdfUse the following word bank to complete the numbers 51-100.  Acoeloma.pdf
Use the following word bank to complete the numbers 51-100. Acoeloma.pdfaroraopticals15
 
Two cards are randomly selected from a 52-card deck. What is the pro.pdf
Two cards are randomly selected from a 52-card deck. What is the pro.pdfTwo cards are randomly selected from a 52-card deck. What is the pro.pdf
Two cards are randomly selected from a 52-card deck. What is the pro.pdfaroraopticals15
 
Two labs are being compared to determine if they are providing the sa.pdf
Two labs are being compared to determine if they are providing the sa.pdfTwo labs are being compared to determine if they are providing the sa.pdf
Two labs are being compared to determine if they are providing the sa.pdfaroraopticals15
 
Todopackage hwk6; This class contains the configuration of a t.pdf
Todopackage hwk6; This class contains the configuration of a t.pdfTodopackage hwk6; This class contains the configuration of a t.pdf
Todopackage hwk6; This class contains the configuration of a t.pdfaroraopticals15
 
This question refers to the ABO blood type locus. Remember that the A.pdf
This question refers to the ABO blood type locus. Remember that the A.pdfThis question refers to the ABO blood type locus. Remember that the A.pdf
This question refers to the ABO blood type locus. Remember that the A.pdfaroraopticals15
 

More from aroraopticals15 (20)

For a given H0 and level of significance, if you reject the H0 for a.pdf
For a given H0 and level of significance, if you reject the H0 for a.pdfFor a given H0 and level of significance, if you reject the H0 for a.pdf
For a given H0 and level of significance, if you reject the H0 for a.pdf
 
Find all elements of our ring R that have norm 1. Show that no elemen.pdf
Find all elements of our ring R that have norm 1. Show that no elemen.pdfFind all elements of our ring R that have norm 1. Show that no elemen.pdf
Find all elements of our ring R that have norm 1. Show that no elemen.pdf
 
Evaluate the decision to have a computer usage policy and the potent.pdf
Evaluate the decision to have a computer usage policy and the potent.pdfEvaluate the decision to have a computer usage policy and the potent.pdf
Evaluate the decision to have a computer usage policy and the potent.pdf
 
At a sudden contraction in a pipe the diameter changes from D_1 to D_.pdf
At a sudden contraction in a pipe the diameter changes from D_1 to D_.pdfAt a sudden contraction in a pipe the diameter changes from D_1 to D_.pdf
At a sudden contraction in a pipe the diameter changes from D_1 to D_.pdf
 
Above is a trace depicting mechanical activity of frog heart. A stud.pdf
Above is a trace depicting mechanical activity of frog heart. A stud.pdfAbove is a trace depicting mechanical activity of frog heart. A stud.pdf
Above is a trace depicting mechanical activity of frog heart. A stud.pdf
 
A gymnosperm, such as Juniperus virginiana, that produces female con.pdf
A gymnosperm, such as Juniperus virginiana, that produces female con.pdfA gymnosperm, such as Juniperus virginiana, that produces female con.pdf
A gymnosperm, such as Juniperus virginiana, that produces female con.pdf
 
Write short descriptive answer to the following questions Discuss wh.pdf
Write short descriptive answer to the following questions  Discuss wh.pdfWrite short descriptive answer to the following questions  Discuss wh.pdf
Write short descriptive answer to the following questions Discuss wh.pdf
 
Why should anyone else care about what I do with my sewage on my own .pdf
Why should anyone else care about what I do with my sewage on my own .pdfWhy should anyone else care about what I do with my sewage on my own .pdf
Why should anyone else care about what I do with my sewage on my own .pdf
 
Why do viral particles, zymosan on fungi, endotoxin (LPS) from gram .pdf
Why do viral particles, zymosan on fungi, endotoxin (LPS) from gram .pdfWhy do viral particles, zymosan on fungi, endotoxin (LPS) from gram .pdf
Why do viral particles, zymosan on fungi, endotoxin (LPS) from gram .pdf
 
Which of the following used historicalcomparative methods in their .pdf
Which of the following used historicalcomparative methods in their .pdfWhich of the following used historicalcomparative methods in their .pdf
Which of the following used historicalcomparative methods in their .pdf
 
Which of following is not a class of the phylum platyhelminthes Tre.pdf
Which of following is not a class of the phylum platyhelminthes  Tre.pdfWhich of following is not a class of the phylum platyhelminthes  Tre.pdf
Which of following is not a class of the phylum platyhelminthes Tre.pdf
 
What is wrong with this code Please fix.code#include stdio.h.pdf
What is wrong with this code Please fix.code#include stdio.h.pdfWhat is wrong with this code Please fix.code#include stdio.h.pdf
What is wrong with this code Please fix.code#include stdio.h.pdf
 
What are two ways that meiosis could produce gametes that contai.pdf
What are two ways that meiosis could produce gametes that contai.pdfWhat are two ways that meiosis could produce gametes that contai.pdf
What are two ways that meiosis could produce gametes that contai.pdf
 
what is the process in society that made this change to advertising .pdf
what is the process in society that made this change to advertising .pdfwhat is the process in society that made this change to advertising .pdf
what is the process in society that made this change to advertising .pdf
 
What is the best way to go about designing an Android AppSoluti.pdf
What is the best way to go about designing an Android AppSoluti.pdfWhat is the best way to go about designing an Android AppSoluti.pdf
What is the best way to go about designing an Android AppSoluti.pdf
 
Use the following word bank to complete the numbers 51-100. Acoeloma.pdf
Use the following word bank to complete the numbers 51-100.  Acoeloma.pdfUse the following word bank to complete the numbers 51-100.  Acoeloma.pdf
Use the following word bank to complete the numbers 51-100. Acoeloma.pdf
 
Two cards are randomly selected from a 52-card deck. What is the pro.pdf
Two cards are randomly selected from a 52-card deck. What is the pro.pdfTwo cards are randomly selected from a 52-card deck. What is the pro.pdf
Two cards are randomly selected from a 52-card deck. What is the pro.pdf
 
Two labs are being compared to determine if they are providing the sa.pdf
Two labs are being compared to determine if they are providing the sa.pdfTwo labs are being compared to determine if they are providing the sa.pdf
Two labs are being compared to determine if they are providing the sa.pdf
 
Todopackage hwk6; This class contains the configuration of a t.pdf
Todopackage hwk6; This class contains the configuration of a t.pdfTodopackage hwk6; This class contains the configuration of a t.pdf
Todopackage hwk6; This class contains the configuration of a t.pdf
 
This question refers to the ABO blood type locus. Remember that the A.pdf
This question refers to the ABO blood type locus. Remember that the A.pdfThis question refers to the ABO blood type locus. Remember that the A.pdf
This question refers to the ABO blood type locus. Remember that the A.pdf
 

Recently uploaded

When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...Nguyen Thanh Tu Collection
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesPooky Knightsmith
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................MirzaAbrarBaig5
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....Ritu480198
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17Celine George
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjMohammed Sikander
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaEADTU
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文中 央社
 
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdf
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdfContoh Aksi Nyata Refleksi Diri ( NUR ).pdf
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdfcupulin
 

Recently uploaded (20)

When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdf
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdfContoh Aksi Nyata Refleksi Diri ( NUR ).pdf
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdf
 

(java) eclipse PleaseDevelop an application that implements a pro.pdf

  • 1. (java) eclipse Please: Develop an application that implements a prototype user interface for composing an email message. The application should have text fields for the To, Cc, and Bcc address lists and subject line, and one for the message body. Include a button labeled Send. When the send button is pushed, the program should print the contents of all fields to standard output using println statements. I need the send button to work. Solution import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Email { private JFrame mainFrame; private JPanel controlPanel; private JLabel output; public Email(){ createForm(); } public static void main(String[] args){ Email emailprog = new Email(); emailprog.sendButton(); } private void createForm(){ mainFrame = new JFrame("Email"); mainFrame.setSize(600,600); mainFrame.setLayout(new GridLayout(2,2)); mainFrame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent windowEvent){ System.exit(0); }
  • 2. }); output = new JLabel("Output: "); controlPanel = new JPanel(); controlPanel.setLayout(new GridLayout(10,2)); mainFrame.add(controlPanel); mainFrame.add(output); mainFrame.setVisible(true); } private void sendButton(){ JLabel to = new JLabel("To: "); JLabel cc = new JLabel("Cc: "); JLabel bcc = new JLabel("Bcc: "); JLabel subject = new JLabel("Subject: "); JLabel msg = new JLabel("Message: "); final JTextField toText = new JTextField(50); final JTextField ccText = new JTextField(50); final JTextField bccText = new JTextField(50); final JTextArea subjectText = new JTextArea(10,50); final JTextArea msgText = new JTextArea(20,50); JButton send = new JButton("SEND"); send.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String data = "To " + toText.getText() + " Cc " + ccText.getText() + " Bcc " + bccText.getText() + " Subject " + subjectText.getText() + " Message " + msgText.getText(); output.setText(""+data+""); } }); controlPanel.add(to); controlPanel.add(toText); controlPanel.add(cc);