Question
I need to make javafx GUI application called Email that implements a prototype user interface for composing email message. The application should have labelled text fields for To, cc,bcc ,subject line, one for message body and button lebelled Send. When we click Send button, the program should print contents of all fields to standard output using println() statement.
I am attaching photos of Email.java and EmailPane.java, I need to make it as per these classes

CylinderSta.. Cylinder java MultiCylind.. . 2 Boxjava D Box 1 package q5 D Imail java 3.import javafx.application.Application:D 8 <p> 9 This is where you put your description about what this class does. You dor 10 have to write an essay but you should describe exactly what it does. 11 Describing it will help you to understand the programming problem better. 12 </p> 13 14 Qauthor Your Name goes here 15 @version 1.e 16 */ 17 public class Email extends Application ( 18 19 /* 20Launches the email application. 21 22@param primaryStage 23 24 a Stage 25 public void start(Stage primaryStage) ( final int appwidth788; final int appHeight see; Scene scene new Scene(new EmailPane(), appwidth, appHeight); 26 27 28 29 3e 31 32 primarystage. setTitle(Email); primaryStage.setscene(scene); primaryStage.show): 34 35 /** 36 37 38 Launches the JavaFX application. * eparam args command line arguments 48 41 public static void main(Stringl] args) t Launch(args): 42 43 45 46 E ProblemsJavadoc Declaration Console No consoles to display at this time. Error Log
media%2F689%2F6898d110-15cb-4fb8-b3a0-e4
0 0
Add a comment Improve this question Transcribed image text
Answer #1

//CODE

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class Email extends JFrame
{
private JLabel To,Cc,Bcc,Subject;
private JTextField receiver,C_c,B_c_c,subject;
private JTextArea textArea;
private JButton send;
public Email() //Constructor
{
send= new JButton("send");
To=new JLabel("To");
receiver=new JTextField(60);
Cc=new JLabel("Cc");
C_c=new JTextField(60);
Bcc=new JLabel("Bcc");
B_c_c=new JTextField(60);
Subject=new JLabel("subject");
Subject=new JTextField(50);
textArea=new JTextArea();
}
private JPanel CreateComponentswithLabel(String Label, Component c)
{
JPanel JP=new JPanel();
JP.setLayout(new BorderLayout());
JP.add(new JLabel(label, JLabel.Top));
JP.add(c,BorderLayout.CENTER);
JP.add(To);
JP.add(receiver);
JP.add(Cc);
JP.add(C_c);
JP.add(Bcc);
JP.add(B_c_c);
JP.add(Subject);
JP.add(textArea);
JP.add(send);
send.addActionListener(new CustomActionListener());
return JP;
}
class CustomActionListener implements ActionListener
{
public void actionperformed(ActionEvent e)
{
System.out.println("To:"+receiver.getText());
System.out.println("Cc:"+rC_c.getText());
System.out.println("Bcc:"+B_c_c.getText());
System.out.println("Subject:"+Subject.getText());
System.out.println("Content:"+textArea.getText());
}
public static void main(String args[])
{
JFrame JF=new JFrame("Compose Messeage");
JF.setDefaultcloseoperation(JFrame.EXIT_ON_CLOSE);
JF.setsize(400,400);
JF.setVisible(true);
Email email=new Email();
JF.add(panel);
JF.setsize(400,400);
}
}

Add a comment
Know the answer?
Add Answer to:
I need to make javafx GUI application called Email that implements a prototype user interface for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • JavaFX! Just need to fill several lanes of code please!!! CSE205 OOP and Data Structure Quiz #15 Last Name (print) First Name (print) Write a JavaFX GUI application program that simulates a timer. T...

    JavaFX! Just need to fill several lanes of code please!!! CSE205 OOP and Data Structure Quiz #15 Last Name (print) First Name (print) Write a JavaFX GUI application program that simulates a timer. The timer should show "count: the beginning and increase the number by 1 in every one second, and so on. o" at .3 A Timer - × A Timer Count: 0 Count: 1 (B) After 1 second, the GUI Window (A) Initial GUI Window According to the...

  • Write a JavaFX application that displays 10,000 very small circles (radius of 1 pixel) in random...

    Write a JavaFX application that displays 10,000 very small circles (radius of 1 pixel) in random locations within the visible area. Fill the dots on the left half of the scene red and the dots on the right half of the scene green. Use the getWidth method of the scene to help determine the halfway point. This is what I have so far: import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.shape.Circle; import javafx.scene.paint.Color; import javafx.stage.Stage; import java.util.Random; import javafx.scene.Group; public class Class615...

  • The JavaFX framework provides more than one way to handle events. For event handlers, we could...

    The JavaFX framework provides more than one way to handle events. For event handlers, we could use inner classes, anonymous inner classes, or the new Java 8 feature of lambda expressions. In this discussion, you will explore these different ways of writing event handles in JavaFX. To prepare for this discussion, you must unzip the attached NetBeans project zip file (U4D1_HandleEvents.zip) and load it into your NetBeans IDE. The project uses an inner class to handle the click event on...

  • # Java import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.stage.Stage; public class Test extends Application {...

    # Java import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.stage.Stage; public class Test extends Application {   @Override // Override the start method in the Application class   public void start(Stage primaryStage) {     // Create a button and place it in the scene     Button btOK = new Button("OK");     btOK.setOnAction(e -> System.out.println("OK 1"));     btOK.setOnAction(e -> System.out.println("OK 2"));     Scene scene = new Scene(btOK, 200, 250);     primaryStage.setTitle("MyJavaFX"); // Set the stage title     primaryStage.setScene(scene); // Place the scene in the stage     primaryStage.show(); // Display the stage...

  • (5 points) Analyze the following codes. b) import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Scene; import...

    (5 points) Analyze the following codes. b) import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.layout.HBox; import javafx.stage.Stage; public class Test extends Application { @Override // Override the start method in the Application class public void start(Stage primaryStage) { Button btOK = new Button("OK"); Button btCancel = new Button("Cancel"); EventHandler<ActionEvent> handler = new EventHandler<ActionEvent>() { public void handle(ActionEvent e) { System.out.println("The OK button is clicked"); } }; btOK.setOnAction(handler); btCancel.setOnAction(handler); HBox pane = new HBox(5); pane.getChildren().addAll(btOK, btCancel); Scene...

  • Can someone please comment this on what the javafx do and how they are implemented? import...

    Can someone please comment this on what the javafx do and how they are implemented? import javafx.application.Application; import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.Scene; import javafx.scene.control.Label; import javafx.scene.layout.GridPane; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; import javafx.scene.paint.Paint; import javafx.scene.text.Font; import javafx.scene.text.FontWeight; import javafx.scene.text.Text; import javafx.stage.Stage; public class TextPanel extends Application { GridPane grid = null; Text scenetitle = null; Label tDrawLabel = null; Label bsc345Label = null; HBox THBox = null; VBox mVBox = new VBox(2); Stage primaryStage = null; @Override public void start(Stage...

  • For this question you will need to complete the methods to create a JavaFX GUI application...

    For this question you will need to complete the methods to create a JavaFX GUI application that implements two String analysis algorithms. Each algorithm is activated when its associated button is pressed. They both take their input from the text typed by the user in a TextField and they both display their output via a Text component at the bottom of the GUI, which is initialized to “Choose a string methods as indicated in the partially completed class shown after...

  • Java Programming Assignment (JavaFX required). You will modify the SudokuCheckApplication program that is listed below. Start...

    Java Programming Assignment (JavaFX required). You will modify the SudokuCheckApplication program that is listed below. Start with the bolded comment section in the code below. Create a class that will take string input and process it as a multidimensional array You will modify the program to use a multi-dimensional array to check the input text. SudokuCheckApplication.java import javafx.application.*; import javafx.event.*; import javafx.geometry.*; import javafx.scene.*; import javafx.scene.control.*; import javafx.scene.layout.*; import javafx.stage.*; public class SudokuCheckApplication extends Application { public void start(Stage primaryStage)...

  • Using JAVA FX how would I combine the two programs below into one interface that allows...

    Using JAVA FX how would I combine the two programs below into one interface that allows the user to pick which specific program they would like to play. They should be able to choose which one they want to play and then switch between them if necesary. All of this must be done in JAVA FX code Black jack javafx - first game program package application; import java.util.Arrays; import java.util.ArrayList; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.application.Application; import javafx.geometry.Pos; import javafx.geometry.Insets;...

  • Java program that creates a photo album application.    Which will load a collection of images...

    Java program that creates a photo album application.    Which will load a collection of images and displays them in a album layout. The program will allow the user to tag images with metadata: •Title for the photo .      Limited to 100 characters. •Description for the photo . Limited to 300 characters. •Date taken •Place taken Functional Specs 1.Your album should be able to display the pictures sorted by Title, Date, and Place. 2.When the user clicks on a photo,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT