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

  Shooting star

Initial project folder you will see the beginnings of a Driver - You need to implement that DoubleListOfBlock methods so they perform

  Design the appropriate accessor and mutator methods

Design an Employee class that has fields for the following pieces of information: Employee Name Employee Number Next, design a class named ProductionWorker that extends the Employee class.

  Remove the comment in front of the line

From the program attached, perform each of the following experiments. Explain in a word document what happens when you do each operation and why this happens.

  How control constructs and arrays would resolve problem

Arrays and control structures are valuable tools when programming. An array contains a number of variables all being the same data type. Explained the situation and how control constructs and arrays would resolve problem

  Need usual internal node structure and constructor

Create a basic, generic DataTree class. As described, it will consist of a binary tree structure, and will need the usual internal node structure and constructor -  Write the other methods used in Section One of the commented-out test code in Main..

  Modify your server to make it multithreaded your server

modify your server to make it multithreaded. your server should allow more than one client to connect and request

  The following program will display an integral solution

The following program will display an integral solution to the quadratic equation ax2+bx+c for integral values of a,b, and c, where a,c fall between 0 and 10, while b falls between 1 and 1000.

  Possible effect that multithreading could have

Imagine you are a graphic artist working on an animation for a movie. Describe at least one (1) possible effect that multithreading could have on your work process. Support your response with at least (1) example of the effect of multithreading

  Write a program to generate a data file named wi ndl. dat

Write a program to generate a data file named wi ndl. dat

  Create a class diagram that shows an interface

Create a class diagram that shows an interface called Buyer in the Violet UML editor. This interface should declare the methods to perform a buyer's responsibilities

  Bilinear and nearest neighbour algorithm in java

How to do bilinear and nearest neighbour algorithm in java. Show how to eliminate change in pixel aspect ratio in java.

  Write a class named retailitem that holds data

Write a class named RetailItem that holds data about an item in a retail store. The class should have the following member variables:description-a string that holds a brief description of the item.unitsOnHand-an int that holds the number of units cur..

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