
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
Question 9
![import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import javax.swing.Timer;
public class TimerExample extends JFrame implements ActionListener
private final Timer myTimer = new Timer (1000, this);
public void start ()
setsize (800, 600);
setVisible (true);
myTimer.setInitialDelay(15000);
myTimer.start();
public void actionPerformed (final ActionEvent theEvent)
// gets the current system time in milliseconds
setTitle (String.valueof (System.currentTimeMilllis ()));
public static void main (final string[] theArgs)
final TimerExample example = new TimerExample();
example.start ();
}
When the main() method is run, how many times will the frame's title change in the first 20.5
seconds after the frame becomes visible? Show reasoning/calculations wherever possible.
Note: Assume that it is the only non-system thread running in the virtual machine (and that
therefore no unexpected delays are introduced in the operation of the timer). The class does compile
as written, so do not look for syntax errors in the code](https://content.bartleby.com/qna-images/question/7384a12d-4ddb-481d-975e-5adc1f339d9e/11607953-830b-4044-a59a-473c23d6e302/vqbxmw_thumbnail.png)
Transcribed Image Text:import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import javax.swing.Timer;
public class TimerExample extends JFrame implements ActionListener
private final Timer myTimer = new Timer (1000, this);
public void start ()
setsize (800, 600);
setVisible (true);
myTimer.setInitialDelay(15000);
myTimer.start();
public void actionPerformed (final ActionEvent theEvent)
// gets the current system time in milliseconds
setTitle (String.valueof (System.currentTimeMilllis ()));
public static void main (final string[] theArgs)
final TimerExample example = new TimerExample();
example.start ();
}
When the main() method is run, how many times will the frame's title change in the first 20.5
seconds after the frame becomes visible? Show reasoning/calculations wherever possible.
Note: Assume that it is the only non-system thread running in the virtual machine (and that
therefore no unexpected delays are introduced in the operation of the timer). The class does compile
as written, so do not look for syntax errors in the code
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- C) Which employees earn less salary than the average salary for the consultants who perform the same job? Show the employees first and last names, job id, salary, department name, and manager's last name. Sort the result by the employees’ employee id. D) For each department, find the manager who pays out the most in salaries. Show the department number, the manager's last name, and the total she/he pays each month. Sort by the department number. Here are the tables and the columns within the table Here are the tables and the columns within the table CONSULTANTS - CONSULTANT_ID- FIRST_NAME- LAST_NAME- EMAIL- PHONE_NUMBER- HIRE_DATE- JOB_ID- SALARY- COMMISSION_PCT- MANAGER_ID- DEPARTMENT_ID . COUNTRIES - COUNTRY_ID- COUNTRY_NAME-REGION_ID . CUSTOMERS - CUST_IDCUST_EMAILCUST_FNAMECUST_LNAMECUST_ADDRESSCUST_CITYCUST_STATE_PROVINCECUST_POSTAL_CODECUST_COUNTRYCUST_PHONECUST_CREDIT_LIMIT . DEPARTMENTS - DEPARTMENT_IDDEPARTMENT_NAMEMANAGER_IDLOCATION_ID . EMPLOYEES -…arrow_forward5. Display the current day of the week, hour, minutes, and seconds of the current date settingon the computer you’re using. SQL commandsarrow_forwardWhat is the name of the columns of thee left hand side of the relationships between columns called?arrow_forward
- define view named itemorder. using sql write the view definition of itemordearrow_forwardThe Colombia City office of StayWell indicated that there is a new tenant by the name of Yigit Yilmaz staying at the property with an ID of 13. You need to include this new resident in the RESIDENTS table.arrow_forwardWhich clause of a SQL Select statement is required if we want to display aggregate data by category such as total population by state, department, etc.? Question 40 options: 1) GROUP BY 2) ORDER BY 3) WHERE 4) FROM 5) SELECTarrow_forward
- Question 13: Evaluate ACE16 +102 10 and show the answer in octal form.arrow_forwardin SQL Code: Explain the difference between number and binary integer and how it is used? Please provide a code examplearrow_forwardI want to know the syntax for sql alter column set default and drop defaultarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education