a. Write an application that extends JPanel and displays your name. Place boxes of different colors around
Question:
a. Write an application that extends JPanel and displays your name. Place boxes of different colors around your name at intervals of 10, 20, 30, and 40 pixels. Save the file as JBorderPanel.java.
b. Modify the JBorderPanel program so that when the user enters any name in a JTextField, the name is displayed with borders at intervals of 10, 20, 30, and 40 pixels. Save the file as JBorderPanel2.java.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 100% (7 reviews)
a import javaxswing import javaawt import javaawtColor public class JBorderPanel extends JPanel String myName new StringJoyce Font serifItalic new Fon...View the full answer
Answered By
Evans Cherono
I am an Information Technology Graduate and willing to work on any computer science or IT work to ensure I do my best all the time.
5.00+
2+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
a. Write an application that extends JPanel and displays a phrase in a large font. Each time the user clicks a JButton, display the same phrase in a different color, a little further to the right,...
-
a. Write an application that extends JPanel and displays a yellow smiling face on the screen. Save the file as JSmileFacePanel.java. b. Add a JButton to the JSmileFacePanel program so the smile...
-
Write an application that extends JPanel and displays a phrase. Each time the user clicks a button, alternate between displaying the phrase upside down and right-side up. Save the application as...
-
Question 4: Artistic Hand for engineering Services was formed on Jun 1, 2018. The following transactions took place during the month of Jun: I The owner invested $20,000 cash in business. 2 Hired an...
-
Assume that the heights of female students are normally distributed with a mean given by = 64.2 in. and a standard deviation given by = 2.6 in. (based on data from a survey of college students)....
-
Explicar cmo asignan los gerentes de marketing sus recursos. OA2
-
16-2. Dos medidas del efecto de las ventas al menudeo en la economa global son
-
A business issued a 45-day, 6% note for $80,000 to a creditor on account. Journalize the entries to record (a) The issuance of the note and (b) The payment of the note at maturity, including interest.
-
As a result of a slowdown in operations, Tradewind Stores is offering employees who have been terminated a severance package of $108,000 cash paid today, $108,000 to be paid in one year, and an...
-
The campus food service would like to determine how many people eat in the student cafeteria. List the survey methods in which this information could be obtained. Which method is best?
-
Use polygons and lines to create a graphics image that looks like a fireworks display. Write an application that extends JPanel and displays the fireworks. Save the file as JFireworksPanel.java.
-
Write an application that extends JPanel and uses the Graphics2D environment to create a GeneralPath object. Use the GeneralPath object to create the outline of your favorite state. Display the...
-
A state lottery commission pays the winner of the Million Dollar lottery 40 installments of $25,000/year. The commission makes the first payment of $25,000 immediately and the other n = 39 payments...
-
Q13. The probability that Ryan will roll a three using a standard die is 1/6. Let Y = number of times that Ryan has to roll a die in order to roll the first three. What is the expected value for Y?...
-
1. The following are data for two IT projects for a new database system. Prepare a spreadsheet for two projects, using the following data. Amounts are in thousands of dollars. Calculate the NPV for...
-
The Matsui Lubricants plant uses the weighted-average method to account for its work-in-process inventories. The accounting records show the following information for a particular day: Beginning WIP...
-
James Cook, a production department worker, is paid on hourly basis at a rate of $15 per hour. James works 40 hours per week. Any time James works over 40 hours, it is considered as overtime and he...
-
You just started working as a Health Service Manager within one of the following healthcare industries. First, choose an industry below to discuss the questions that follow: Ambulatory Surgery center...
-
Eastlink Limited has a monthly payroll of $4 million. The payroll manager selects a short-term investment for the money with a 0.6% p.a. rate. At the end of one month, what is the maturity value of...
-
B made an issue of 150,000 $1 ordinary shares at a premium of 20% the proceeds of which is received by cheque. What is the correct journal to record this? A. Bank Share capital Share premium B. Bank...
-
Write an application that prompts the user for three first names and concatenates them in every possible two-name combination so that new parents can easily compare them to find the most pleasing...
-
a. Create a program that contains a String that holds your favorite inspirational quote and display the total number of spaces contained in the String. Save the file as CountSpaces.java. b. Write an...
-
Write an application that prompts the user for a password that contains at least two uppercase letters, at least three lowercase letters, and at least one digit. Continuously reprompt the user until...
-
Hite corporation intends to issue $160,000 of 5% convertible bonds with a conversion price of $40 per share. The company has 40,000 shares of common stock outstanding and expects to earn $600,000...
-
Your portfolio has a beta of 1.17, a standard deviation of 14.3 percent, and an expected return of 12.5 percent. The market return is 11.3 percent and the risk-free rate is 3.1 percent. What is the...
-
Slow Roll Drum Co. is evaluating the extension of credit to a new group of customers. Although these customers will provide $198,000 in additional credit sales, 13 percent are likely to be...
Study smarter with the SolutionInn App