1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
steposvetlana [31]
3 years ago
9

Please design a Java GUI application with two JTextField for user to enter the first name and last name. Add two JButtons with a

ction events so when user click on one button to generate a full name message from the user input and put it in a third JTextField which is not editable; and click on the other button to clear all three JTextField boxes. Please run the attached nameFrame.class file (Note: because there is an actionhandler inner class in this program, another class file nameFrame$actionhandler.class was generated when you compile the .java file, you need both files in the same directory in order to run) to see the sample output. You need to design your program with a similar look and have your name as the author in a JLabel.

Computers and Technology
1 answer:
Ede4ka [16]3 years ago
5 0

Answer:

Check the explanation

Explanation:

Code :

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

public class nameFrame {

private JFrame mainFrame;

public nameFrame(){

prepareGUI();

}

public static void main(String[] args){

nameFrame nameFrame = new nameFrame();

}

private void prepareGUI(){

mainFrame = new JFrame("Name Frame");

mainFrame.setSize(450,250);

mainFrame.setLayout(new GridLayout(5, 2));

 

mainFrame.addWindowListener(new WindowAdapter() {

public void windowClosing(WindowEvent windowEvent){

System.exit(0);

}

});  

JLabel fname= new JLabel("First Name : ");

JLabel lname = new JLabel("Last Name : ");

JLabel fullname = new JLabel("Full Name : ");

JTextField fnameText = new JTextField(15);

JTextField lnameText = new JTextField(15);

JTextField fullnameText = new JTextField(30);

fullnameText.setEditable(false);

JButton submit = new JButton("submit");

submit.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {  

String data = fnameText.getText() + " " + lnameText.getText();

fullnameText.setText(data);

}

});

JButton clear = new JButton("clear");

clear.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {  

fnameText.setText("");

lnameText.setText("");

fullnameText.setText("");

}

});

mainFrame.add(fname);

mainFrame.add(fnameText);

mainFrame.add(lname);  

mainFrame.add(lnameText);

mainFrame.add(fullname);  

mainFrame.add(fullnameText);

mainFrame.add(submit);

mainFrame.add(clear);

mainFrame.setVisible(true);

}

}

Kindly check the attached output image below.

You might be interested in
Explain the term remote backup with examples.​
MA_775_DIABLO [31]

Answer:

Remote Backup means the backup of your data that is stored at some online storage place or server.

Explanation:

Remote is the terminology that is used for distance things that are not directly accessible but can be accessed through some online medium.

Backup means copy your data or information that is stored some where other than your PC.

So Remote Backup is a type of server that is used to store data on some online storage or server. Some times this server is called cloud.

<u>For Example</u>

Dropbox and Google drive are the examples of the remote server, These two storage are used to backup our data online. We can store and access data through these drives by on online server or storage by just having an internet connection.

5 0
4 years ago
Thomas asked his friend for a software suite. His friend had the software suite in his computer and he copied it into a small, r
Misha Larkins [42]

Answer:

The correct answer to the following question will be "Flash memory card".

Explanation:

A flash memory card seems to be a storage (small) medium which stores data or information on fordable or remote devices using non-volatile transistor technology hardware.

  • Most newer offerings include flash storage or memory chips, even though the development of other memory innovations is underway.
  • This would be the storage mechanism from which the configuration tool was replicated by Thomas' friend.
8 0
4 years ago
Priscilla is providing the junior analysts in her firm with some real-world illustrations to explain some of the recommendations
sesenic [268]

Options:

a) The client wants to develop internal resources and capabilities

b) The client is looking for the lowest possible costs

c) The client has unique business requirement that must be satisfied by this software application

d) The client has some existing technology in place whose requirements must be met by the new software

Answer:

d) The client has some existing technology in place whose requirements must be met by the new software

Explanation:

For a client to purchase a software, the client has an already existing technology that requires that software for adequate functioning. The analyst will recommend the new software to the client based on the technology he/she previously has and the requirements he wants to meet.

The other options are not impossible, but they are not the primary reason why the software will be purchased, the overall aim for all the company's activities may be to develop internal resources and capabilities or to meet some unique business requirements, but these are secondary. The primary purpose is that the client has a technology that cannot function properly without the recommended software.

4 0
3 years ago
When is it not a good idea to remove a program from your computer by simply deleting its directory?
hodyreva [135]

Hi!

Usually computer programs have a lot of settings that, if not standardized, would make it super difficult to communicate with the operating system or other programs. Because of this, programs and the Windows Operating System use a special Registry system in order to standardize crucial settings for both applications and the operating system itself.

If you were to remove a directory to try to uninstall a program, you're leaving behind the files in the registry (don't worry though, it won't affect anything in terms of what your computer does) which can sometimes eat up space if there's enough of them.

Therefore, I would say your best bet is C. If the program adds information to the operating system.

I hope my answer helped!

5 0
3 years ago
An Excel file can be saved as a Web page. T or F
Katen [24]

Answer:

True

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • Processing is handled by the computer’s central processing unit (cpu).​ <br> a. True <br> b. False
    6·1 answer
  • A direct link between a single ____ preserves the fine details in the cones message
    11·1 answer
  • A typical, small, dry cell battery has a voltage of A. 6.0 volts. B. 1.0 volts. C. 12.0 volts. D. 1.5 volts.
    11·2 answers
  • Which of the following is typically not found in web page-authoring software
    9·1 answer
  • Use ___________ positioning to configure the location of an element to remain the same and to not move even when the web page is
    6·2 answers
  • 50 POINTS PLEASE HELP MEEEEEEEEE!!!!!!
    7·2 answers
  • Choose
    7·1 answer
  • Match the items with their respective descriptions.
    6·2 answers
  • What is the dark web and what is the .onion domain
    15·2 answers
  • Which event represents an example of social media being used in an
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!