Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program7 firstGUI Computer Science 1 : Java Programming Dr. David Cline Program 7: First GUI Throughout the semester, we have been workng on command line

Program7 firstGUI

image text in transcribed

Computer Science 1 : Java Programming Dr. David Cline Program 7: First GUI Throughout the semester, we have been workng on command line applications. While the command line can be a poerful form of interacting with the computer, most modern applications hare a graphical user interface, or GUL. This program will give you some initial experience making GUI applications with Swing. Things you will lean .How to set up a simple GUI based on JFrame .Setting up listeners and responding to ervents Drauing simple shapes and images Dealing with mouse and mouse motion erents Directions 1. Wit a GUI application in Javausing Swing that has four buttons and a drawing area. The buttons should be at the top of the windo "Image", "Center". The fourth button should be labeld with your name. Three of the buttons should be labeled "Oval", 2. Give the window an initial size of 300 x 600 pixels, and put your name in the menu bar. 3. The drawing area should cover the remainder of the window. 4. Whan it starts, the program should show an oval in the center of the screen. Also the background of the drawing area should be a non-white color 5. Pressing the al or Image buttons should switch betuween the display of an oval and an image of your choice, so that only one is visible at a time. 6. You must also be able to click and drag the rectangle or image around the screen with the mouse. Also, the positions of the two objects must not change as you toggle beteen them 7. The"center" button should cause the oval and image to jump to the center of the window. When the user presses the button with your name on it, the program should do something else not described in the assignment that is unique to your program, such as change the color of all the things you draw, switch the oval to be outlines instead of filled, or draw your name in the middle of the window. 8. 9. As always, make sure the proper block comment is at the top of your main file with your name. 10. Once your program is working, pass it off directly to the instructor or TA. Also, turn in your code to D2L

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

Students also viewed these Databases questions

Question

What does the start( ) method defined by Thread do?

Answered: 1 week ago