Write a program that that displays a dialog box

Assignment Help JAVA Programming
Reference no: EM131037521

Basic Requirements

Write a program that that displays a dialog box show a message and a randomly chosen color.

This random color is to be used as the background color of a JFrame window which should appear after "OK" is selected. The window should ask your name and thank you for playing once "Enter" is pressed.

See sample output below.

LiFiUnit7Ch17.java

-Utilize showMessageDialog to output the message shown in the sample at the bottom. A random color should be output with each run

-Upon clicking OK

-Create a JFrame window

o Set the background and label text color as shown in sample below
o Include a label asking to enter name (see sample)
o Include a textfield to get input for name (see sample)
o Upon hitting "Enter" on the keyboard, output thank you message to include the name entered as per sample at bottom

-Use an inner class for the listener

-Mimic the same session precisely. Pay attention to colors of the window and label.

Reference no: EM131037521

Questions Cloud

Find the domain of the following rational function : Find the domain of the following rational function. Write it in the form p(x)/q(x) for polynomial functions  p and  q  and simplify: f (x) = 1 - {3 / (x + 1).
Human resource management provide to toyota : What types of inputs would you expect to see Human Resource Management provide to Toyota and the leadership of Toyota, as it makes its way forward and tries to regain its focus?
What would be the limitations of linear programming : What insights into rational decision making approach can you draw from this video - what would be the limitations of linear programming?
What should be the standard deviation to get six sigma level : Company XYZ is evaluating whether it is meeting the six sigma requirement or not. The company promises its customer to deliver the product in 20 to 75 hours. Actual shipment data has a mean of 50 hours and standard deviation of 5 hours. Is the compan..
Write a program that that displays a dialog box : Write a program that that displays a dialog box show a message and a randomly chosen color. This random color is to be used as the background color of a JFrame window which should appear after "OK" is selected
Analyze each partnership separately : Collaborative agreements with foreign companies in the form of strategic alliances or joint ventures are widely used as a means of entering foreign markets. They are also used as a means of acquiring resources and capabilities by learning from foreig..
What are the policy arguments in favor of both parties : Should the court grant the request? If so, what might it encourage Paine to do? Would all of the debts be discharged? Does Paine have other options if the Chapter 7 petition is dismissed?
What are your views about abortion : What are your views about abortion? Respond to at least three or more of the main aspects of the abortion issue: prolife, prochoice, Roe vs. Wade; late term abortion, rights of women over their bodies, adoption options, bombing of abortion clinics, a..
Calculate the expected return of optimal risky portfolio : Assessment 2 aims to provide students with an opportunity to analyse various investment alternatives based on the respective risk and return so as to choose the most appropriate investment opportunity. Calculate the expected return and standard devia..

Reviews

Write a Review

 

JAVA Programming Questions & Answers

  Use inheritance to read, store, and print questions for test

use inheritance to read, store, and print questions for a test. First, write an abstract class

  Write a program that allows a user to enter a line of text

Write a program that allows a user to enter a line of text, counts number of words and number of vowels in the sentence, and gives the average number of vowels per word in the message

  Develop java code to compute monthly rent for housing units

Develop a java code that computes monthly rent for 3 housing units namely Bungalows,Apartments and hostels. All housing units have got size,color and monthly rental rate.

  Build distributed applications using technologies

Build distributed applications using technologies like Unix and Java sockets, SUN RPC, Java RMI, and message-passing tools such as PVM and MPI and

  Despite public and private health insurance programs

Why is it that despite public and private health insurance programs, some US citizens are without health coverage?

  Generate an amortization schedule

The applet input will be the loan amount, annual percentage rate (APR), and the number of years to pay out the loan. The output will be the loan amount, interest rate per pay period number of pay periods and the monthly payment

  Describe the graphical coordinate system in java

Describe the graphical coordinate system in Java. Where is the origin? What units apply to the x,y coordinates? How would you use the Graphics class to draw a line between 2 specific points? Give an example

  Start developing java code to ask questions

You are ready to start developing Java code to ask questions on customer information and the sub that customers want to order. You are only concerned with the functionality to request and provide feedback on what the customer entered

  What is the difference between statement

What is the difference between Statement and PreparedStatement interface?

  What does this sequence of statements print

What is wrong with the following variable declarations - What does this sequence of statements print

  Create a book class

Create a Book class. In addition to properties of author and isbn, with setters/getters, the Book should override Object's base method "boolean equals(Object)" and have a "boolean validate()" method.

  The user enters an invalid value for hours

Write a program that prompts the user to enter time in 12-hour notation. The program then outputs the time in 24-hour notation. Your program must contain three exception classes: InvalidHrExcep, InvalidMinExcep, and InvalidSecExcep. If the user enter..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd