A JFrame contains a JButton named button1 that should execute an actionPerformed() method when clicked. Which statement
Question:
A JFrame contains a JButton named button1 that should execute an actionPerformed() method when clicked. Which statement is needed in the JFrame class?
a. addActionListener(this);
b. addActionListener(button1);
c. button1.addActionListener(this);
d. this.addActionListener(button1);
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 62% (16 reviews)
Answered By
Muhammad Umair
I have done job as Embedded System Engineer for just four months but after it i have decided to open my own lab and to work on projects that i can launch my own product in market. I work on different softwares like Proteus, Mikroc to program Embedded Systems. My basic work is on Embedded Systems. I have skills in Autocad, Proteus, C++, C programming and i love to share these skills to other to enhance my knowledge too.
3.50+
1+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
a. Write an application that instantiates a JFrame that contains a JButton. Disable the JButton after the user clicks it. Save the file as JFrameDisableButton.java. b. Modify the JFrameDisableButton...
-
a. Write an application that displays a JFrame containing the opening sentence or two from your favorite book. Save the file as JBookQuote.java. b. Add a button to the frame in the JBookQuote...
-
Suppose that a class named Bicycle contains a private nonstatic integer named height, a public nonstatic String named model, and a public static integer named wheels. Which of the following are legal...
-
What is a self-imposed budget? What are the major advantages of self-imposed budgets? What caution must be exercised in their use?
-
In 2016, RayeAnn acquires a car for $14,000. She uses the car in her advertising business and for personal purposes. Her records indicate the car is used 70% for business and that the total operating...
-
JAVA please: Responsibility for evaluating the effectiveness of emails sent to the company recently. Basically, you need to do a program that reads the contents of an email sent by an employee and...
-
Is the initiator of a use case the same as the primary actor? Explain.
-
Bart and Elizabeth Forrest, both age 47, are married and have no dependents. They have asked you to advise them whether they should file jointly or separately in 2016. They present you with the...
-
Assume the discount rate is 10%. An FI originates a pool of real estate loans worth $2 million with maturities of 5 years and paying interest rates of 10% APR per year. Calculate the yearly payments...
-
Deer Lake Inc. uses a job order costing system with manufacturing overhead applied to products at a rate of 150% of direct labor cost. Find the missing amounts by treating each case independently....
-
A class that will respond to button-press events must use which phrase in its header? a. Import java.event b. Extends action c. Extends j frame d. Implements action listener
-
When you use the getSource() method with an ActionEvent object, the result is a(n) ____________. a. Object b. ActionEvent c. Component d. TextField
-
Florida Company purchased a building and the land on which the building is situated for a total cost of $800,000 cash. The land was appraised at $300,000 and the building at $700,000. Required a....
-
The differences between U.S. GAAP and IFRS with respect to property, plant, and equipment, which do you believe is going to be the greatest challenge to converge? Why? What do you believe is the best...
-
Aaron Corporation, which has only one product, has provided the following data concerning its most recent month of operations: Selling price Units in beginning inventory $ 90 0 Units produced Units...
-
What are the intricate mechanisms underlying delegation within organizational structures, and how do they contribute to the distribution of authority and responsibility?
-
Carolina Lab Supply sells a dual access laminar flow hood with a list price of $60,000 to BioStart Inc. BioStart Inc. will pay $65,000 in one year and gives Carolina a note payable. This type of note...
-
Gel Shell makes gel nail polish, which they sell for $18/bottle. Gel Shell has the following costs Gel Shell's Costs Type of Cost Amount Direct Materials $2/unit Direct Labor $3/unit Variable...
-
Which of the overall HR strategies would be best for Stringtown Iron Works
-
SBS Company have received a contract to supply its product to a Health Care Service Hospital. The sales involve supplying 1,250 units every quarter, the sales price is RM 85 per unit. The Client...
-
Write a program that displays all the numbers from 100 to 200, ten per line, that are divisible by 5 or 6, but not both. Numbers are separated by exactly one space.
-
Use a while loop to find the smallest integer n such that n2 is greater than 12,000.
-
Use a while loop to find the largest integer n such that n3 is less than 12,000.
-
Based on the introductory in Public Finance, what do you think must be the main role of the government in our individual lives? Any references will do, as long as the answer is related to question...
-
Apercu Industries borrowed $92,350 for 200 days at 15% simple interest. Find the total interest they will pay (a) using bankers' rule and (b) using the exact method.
-
On January 4th, Mark went to the hospital to have an appendectomy. His deductible is $2,500 and since it is the beginning of the year, he has not contributed anything to the deductible yet. The total...
Study smarter with the SolutionInn App