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...
-
Which acid of each pair shown here would you expect to be stronger? (a) (b) (c) (d) (e) HO HO 10 HO HO 3 10 F O or OH OH or MeJN OH OH or CF
-
How should this woman have dealt with the late-night request by her boss? LO.1
-
The following is an excerpt (with dates changed) from Against the Grain, a series of recommendations by the State Comptroller of Texas as to how to save $4.5 billion and thereby balance the states...
-
Mark Newton has just opened a gourmet coffee bar, the first of its kind in Fountain, North Carolina. You are Mark's accountant. On a recent visit to the store, you asked how the budget was coming...
-
Explain the entrepreneurial characteristics of Tariq. How did they evolve over a period of time? Tariq a Mechanical Engineer graduated from University of Engineering and Technology. After which he...
-
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
-
ASC 740 provides a two-step process in accounting for uncertain tax positions. What are these two steps?
-
how could a government or world leader have used ERM to respond to one of the financial, operational, or governance aspects of the covid19 pandemic? include references for further reading.
-
Computing and Interpreting Return on investment Selected operating data for two divisions of Outlook Brewing, Ltd., of Australia are given below: Division Queensland New South Wales Sales: $4,000,000...
-
Consider a parcel of land that contains an even ages stand of trees currently of age in A in t=0. you have to decide how much longer to allow this stand to grow given that when you cut the stand, you...
-
What does the company report for the following accounts for the most current fiscal year:Enter your answer in thousands.a . Cash$fill in the blank 1 1 , 1 5 4 , 8 6 7 b . Short - term investments (...
-
Consider the translational mechanical system with a nonlinear spring shown below. The spring is defined by s(t)=ks(t), where x(t) is the spring length and f(t) the spring force. Nonlinear spring 0000...
-
Yum! Brands, Inc. (YUM) is a worldwide operator and franchisor of fast-food restaurants, under the familiar brands of KFC, Pizza Hut, Taco Bell, and Habit Burger Grill. Segment revenues, operating...
-
Use integration by parts to evaluate the following. Check your answer by taking the derivative. x2e-xdx
-
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.
-
You borrowed $15,000 for buying a new car from a bank at an interest rate of 12% compounded monthly. This loan will be repaid in 48 equal monthly installments over four years. Immediately after the...
-
Discuss how debt restructuring, settlement, or modification works. Discuss the journal entries for debtor and creditor
-
Could CNL be a viable business? If so, under what conditions and what level of production (and, since production is directly related to production workers, employees)? All information provided for...
Study smarter with the SolutionInn App