Question: Magic 8 Ball Java Program It will be a Java application. It will use the appropriate Swing and Abstract Window Toolkit classes for graphics. Your

Magic 8 Ball Java Program

It will be a Java application. It will use the appropriate Swing and Abstract Window Toolkit classes for graphics.

Your Magic8Ball class will extend JFrame and contain a JLabel, a JTextArea, and JScrollPane.

The answers will be stored in a String array and selected by a random number generator.

Your Magic8Ball will be capable of producing ten different answers. Five of the answers will be generally affirmative, five will be generally negative. If the answer selected by the Magic8Ball code is positive, the background color for the answer will be green. If the answer selected by the Magic8Ball code is negative, the background color will be red.

The Magic8Ball will contain a disclaimer statement in a text area set in a scroll pane. Appropriate access modifiers will be assigned to classes and class members.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!