Reference no: EM13164599
1. Write a GUI application in Java using Swing that has three buttons and a drawing area.
2. Give the window an initial size of 500 x 500 pixels, and put your name in the menu bar.
3. The buttons should be at the bottom of the window and be labeled "Name", "Oval" and "Rectangle".
4. The drawing area should cover the remainder of the window.
5. When it starts, the program should show nothing in the drawing area.
6. Pressing one of the buttons must toggle (turn on or off) the display of one of three things, any or all of which must be viewable simultaneously.
1. Pressing "Name" should toggle the display of your name.
2. Pressing "Oval" should toggle drawing an oval centered on the window.
3. Pressing "Rectangle" should toggle drawing a rectangle centered on the window. The rectangle and oval should not be filled, so that all three things can be seen.
7. When drawn, each of the items should be a different color of your choice.
8. When the user resizes the window, the displayed items must stay at the center of the drawing area.
9. When the program displays an oval or a rectangle, it must draw the figure with 3/4 the width and height of the display area, resizing it when the window gets resized. The text does not have to resize, but must remain in the center of the window.
10. (Optional) Make a fourth button called "special" that does something else notdescribed in the assignment, such as change the background color.
Design a program that extends the definition of the class
: Design a program that extends the definition of the class JFrame to display a window on the screen. Name your class PropertyTax1, title your window "Calculation of Property Taxes," set the window's width to 400 pixels and height to 300 pixels, and te..
|
Program to keep track of the participants in a triathlon
: Create a program to keep track of the participants in a triathlon. Your program will keep track of the times in three events: Running, Swimming, and Biking. Your program will calculate who is the winner in the Male category and the Female category..
|
Write an abstract class carbon footprint
: Using an abstract class with only pure virtual functions, create three small classes unrelated by inheritance---clases Building, Car and Bicycle.
|
Calculate the geometric mean of numbers
: Write a program to calculate the geometric mean of numbers entered by a user. The program should prompt the user to enter numbers and continue to accept the numbers until the user enters 999.
|
Make a fourth button called special
: Make a fourth button called "special" that does something else notdescribed in the assignment, such as change the background color.
|
Write a c function called values that returns void
: Write a C function called values that returns void and takes two double precision arguments (called a and b) and one double precision array argument.
|
Trojan horse defense
: Using your favorite search engine, look up "Trojan Horse Defense". How can it be used to question the conclusions drawn from a forensic investigation? Site a case where it was used.
|
Write a java program that uses a search tree of strings
: Write a Java program that uses a search tree of strings to sort text lines in alphabetic order. You may choose how you de?ne alphabetic order as long as there is some sense in the de?nition. You may also choose what kind of tree you use.
|
Fragmentation on a storage device
: Fragmentation on a storage device could be eliminated by re-compaction of the information. Typical disk devices do not have relocation or base registers (such as are used when memory is to be compacted)
|