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

  Need of arrays and list

why do we need arrays and list and why are they important?

  In this project you need to write a java program called

in this project you need to write a java program called mm.java to perform matrix multiplication. your code will read

  Write a java application that prompts the user for input

Write a Java application that prompts the user for pairs of inputs of a product number (1-5), and then an integer quantity of units sold (these are two separate prompts for input values).

  Declare a string variable named empty

Declare a string variable named empty, and initialize it to the empty string.

  Define a method for linkedbag

Add a constructor to the class LinkedBag that creates a bag from a given array of entries - define a method for LinkedBag that removes a random entry from the bag.

  Create an application named numbers.

Create an application named Numbers. The Numbers class should have non-static public methods named sum and difference, each taking a pair of int variables as arguments. As you might expect, the sum method should add the two integers and return the..

  Create the class airplane

Your missions is to create the class Airplane. Each Airplane object should store the following information (fields):

  Recursion in binary search trees

Assignment is intended to give you practice writing recursive code that traverses a common computer programing structure: a binary search tree.

  What is abstract class and how it differ from regular class

What is an abstract class and how does it differ from a regular class? Why are abstract class constructors defined as protected

  Create a pair of programs a client and a server to

create a pair of programs a client and a server to distribute the functions of the library you developed. the client

  Assignment related to java programming

Question 1: Write a java program to compute the squares of the numbers in the array list like 1, 2, 3, 4... up to 50. Question 2: Write a java program to compute the sum of numbers and average in the array list up to 50.

  Implement the hashcode method

Java, every object has an equals and a hashCode method that is used, among other things, by the standard Collections library. By default both are based on an object's memory location

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