Java, create a user interface that has a top bar that includes a menu. The menu should have four items. When the user selects the first menu option, then the date and time should be printed in a text box. When the user selects the second menu option, then the text box contents should be written to a text file named "log.txt." When the user selects the third menu item then the frame background color changes to random color hue of the color green. The menu option should display the initial random hue each time selected for a single execution of the program. See https://www.w3schools.com/colors/colors_picker.asp When the user selects the fourth menu option then the program exits

EBK JAVA PROGRAMMING
8th Edition
ISBN:9781305480537
Author:FARRELL
Publisher:FARRELL
Chapter16: Graphics
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question
100%

In Java, create a user interface that has a top bar that includes a menu. The menu should have four items.

  • When the user selects the first menu option, then the date and time should be printed in a text box.
  • When the user selects the second menu option, then the text box contents should be written to a text file named "log.txt."
  • When the user selects the third menu item then the frame background color changes to random color hue of the color green. The menu option should display the initial random hue each time selected for a single execution of the program. See https://www.w3schools.com/colors/colors_picker.asp
  • When the user selects the fourth menu option then the program exits.

Thank you

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

How do I know for certain that when the user selects the second menu option, the text box contents are written to a text file named "log.txt." Is there a way to view it?

 

Solution
Bartleby Expert
SEE SOLUTION
Follow-up Question

I ran this code and the green color aspect does not work when selecting "Change Background". How can this be fixed?

Solution
Bartleby Expert
SEE SOLUTION
Follow-up Question

Can you further elaborate on what each line of code is doing? As in more comments.

Thank you

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Graphical User Interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,