ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 10 Weeks Ago, 4 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 26 Apr 2017 My Price 11.00

declare a Label to store your Image Icon

I am having trouble with problem two. Could you help me with this and give me details of what each line of code is doing and why?

 

 

public class PanelExample extends JPanel { // declare an ImageIcon object. // declare a Label to store your Image Icon // declare a TextField to store the basketball team location // declare a TextField to store the famous basketball player's name // declare a TextField to store the current ticket price to see a game // declare a Button to click when information is entered // declare a Label to display the ticket price and location information // constructor public PanelExample() { // set preferred size of the panel to 400 x 550 // create an image icon and add the path to you image in it. // your image should also be stored in your src folder or somewhere // in your project // instantiate the Label for the Image Icon and add the Image Icon // add the Label to the Panel // instantiate the TextField for the location // add the TextField to the Panel // instantiate the TextField for the players's name // add the TextField to the Panel // instantiate the TextField for the current ticket price // add the TextField to the Panel // instantiate the Label to display the all the information. // add the Label to the Panel // instantiate the Button to click // add an ActionListener to the button // add the Button to the Panel } private class buttonListener implements ActionListener { // don't forget add the unimplemented method - eclipse will help with this // in the method, disable all the TextFields // calculate the ticket price if you were to purchase using Canadian currency // set the ticket price in US dollars and Canadian and append the location } }

CSCI 135 Lab 5 Program 1
1. Create a Driver class that creates a Frame using the following outline (feel free to rename the
class): http://pastebin.com/yKwSQUJ5
2. Create a panel using this outline: http://pastebin.com/RxzVYnfp
3. Change the background color of the panel to a color found in the room where you are.
4. Add a graphic showing your favorite appetizer.
5. Create another panel.
6. Change the background to a complimentary color to your favorite color.
7. Add some text with at least three things you like to do with friends (in different labels) to this
panel.
8. Add this panel to your original panel.
9. Create another panel.
10. Change the background of this panel to a different color than your first two panels.
11. Add some text to this panel describing a favorite memory.
12. 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! Let’s 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 player’s 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.

Attachments:

Answers

(11)
Status NEW Posted 26 Apr 2017 07:04 AM My Price 11.00

-----------

Attachments

file 1493192178-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)