- Create a Driver class that creates a Frame using the following outline (feel free to rename the class): http://pastebin.com/yKwSQUJ5
- Create a panel using this outline: http://pastebin.com/RxzVYnfp
- Change the background color of the panel to a color found in the room where you are.
- Add a graphic showing your favorite appetizer.
- Create another panel.
- Change the background to a complimentary color to your favorite color.
- Add some text with at least three things you like to do with friends (in different labels) to this panel.
- Add this panel to your original panel.
- Create another panel.
- Change the background of this panel to a different color than your first two panels.
- Add some text to this panel describing a favorite memory.
- Add this panel to your original panel..
Extra Credit:
Use the Border Layout to put your panels into different areas of the screen.
Program 2:
Basketball season is among us! Lets create a quick graphical basketball application.
1. Create another frame. http://pastebin.com/yKwSQUJ5
2. Next, create a JPanel, and inside of it, you are going to display some basketball information (again feel free to change the class name). http://pastebin.com/GxVKpY7M
3. Set the height of the panel to 400.
4. Set the width of the panel to 550.
5. Your panel should first display an image of something related to basketball.
6. You should be able to add a location.
7. You should be able to add the players name.
8. You should be able to set the current ticket price. Use a textbox for this.
9. Once you set these items, click on the button and your program should display the ticket price in dollars and Canadian dollars along with the location.
10. When the button is pushed, all the text fields should be disabled as well. Extra credit: Use a layout manager to make all your information show up an organized way. Have the image change whenever the button is clicked to random images.
Reviews
There are no reviews yet.