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...
-
The Holtz Corporation acquired 80 percent of the 100,000 outstanding voting shares of Devine, Inc., for $7.20 per share on January 1, 2014. The remaining 20 percent of Devines shares also traded...
-
The following transactions occurred during the month for Mona Wade, CPA, PC: a. Wade opened an accounting firm by investing \($16,500\) cash and office furniture valued at \($5,300\). The business...
-
During 2015, Kent, a 40-year-old single taxpayer, reports the following items of income and expense: Income: Salary ...$150,000 Dividends from Alta Corporation ... 800 Interest income from a savings...
-
State what is meant by capacity planning, giving suitable example. Give two reasons to show the importance of capacity planning in operation management. Discuss the capacity planning process that...
-
Kelly Pitney began her consulting business, Kelly Consulting, on April 1, 20Y5. The accounting cycle for Kelly Consulting for April, including financial statements, was illustrated in this chapter....
-
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
-
Explain the process of tube drawing.
-
Lopez acquired and placed in service a building on June 1, 2018, for $41,564,200. Compute the depreciation deduction assuming the building is classified as (a) residential and (b) non residential....
-
The output of a company's mixing department during the period consists of 24000 units completed and transferred out, and 14200 units in ending Work in Process Inventory that were 25% complete as to...
-
Consider the following Bayesian network with 10 variables {X, X2,..., X10}. X3, X8( X X7 XA, Which of the following statements are true: 1. X6 X X2, X4 2. X6 X9 | X4 3. X3 X9 | X8 4. X X2 | X6 5. X4...
-
Examine the role of deconstruction in postmodern literature. What are the implications of deconstructing narrative conventions, and how does this technique alter the reader's understanding of the...
-
PLEASE HELP 1. sin cos 0 1 + sin 0 1. Given 1-sin 0 cot a. Prove the identity. (2 marks)
-
1. Given the soft-goods targets, are these marked correctly? If not, what should the initial retail price be to obtain her 60 percent minimum initial markup percentage? 2. By noon another shipment...
-
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.
-
If you were a conscious leader, how would you balance the playing field to ensure that such behaviors do not affect your business philosophy?
-
Jack is at Walmart and has been accused of shoplifting. Using the Shopkeepers privilege, discuss what Walmart is and isn't allowed to do from when they initially approach him all the way until the...
-
Calculate the number of units to be produced in May if your desired ending inventory is 40% of the next month's sales, beginning finished goods inventory for May was 36,000 units, May's sales are...
Study smarter with the SolutionInn App