write a watch java program​

Answers

Answer 1

Answer:

import javax.swing.*;  

import java.awt.*;  

import java.text.*;  

import java.util.*;  

public class DigitalWatch implements Runnable{  

JFrame f;  

Thread t=null;  

int hours=0, minutes=0, seconds=0;  

String timeString = "";  

JButton b;  

 

DigitalWatch(){  

   f=new JFrame();  

     

   t = new Thread(this);  

       t.start();  

     

   b=new JButton();  

       b.setBounds(100,100,100,50);  

     

   f.add(b);  

   f.setSize(300,400);  

   f.setLayout(null);  

   f.setVisible(true);  

}  

 

public void run() {  

     try {  

        while (true) {  

 

           Calendar cal = Calendar.getInstance();  

           hours = cal.get( Calendar.HOUR_OF_DAY );  

           if ( hours > 12 ) hours -= 12;  

           minutes = cal.get( Calendar.MINUTE );  

           seconds = cal.get( Calendar.SECOND );  

 

           SimpleDateFormat formatter = new SimpleDateFormat("hh:mm:ss");  

           Date date = cal.getTime();  

           timeString = formatter.format( date );  

 

           printTime();  

 

           t.sleep( 1000 );  // interval given in milliseconds  

        }  

     }  

     catch (Exception e) { }  

}  

 

public void printTime(){  

b.setText(timeString);  

}  

 

public static void main(String[] args) {  

   new DigitalWatch();  

         

 

}  

}  

Explanation:


Related Questions

The ____ command enables you to initialize the terminal display or terminal window, to place text and prompts in desired locations, and to respond to what the user selects from the menu

Answers

Answer:

tput

Explanation:

Due to the fact that the * character can be used to match all ​characters in a filename, or all files in a directory, it is referred to as a ____________ metacharacter

Answers

Answer:

"Wildcard " seems to be the correct choice.

Explanation:

A metacharacter would be any character with a particular relevance, including a carat (^), a dollar sign ($) as well as an asterisk (*).It is different compared to something like the wildcard metacharacter. This same character developers have been using alone would be a period or perhaps a dot. With the exception of a new line it compares another other character.


Which is an example of intrinsic motivation?
allowing time to do an after-school activity once studying is done
asking the teacher for extra credit to improve a test score
doing extra studying beyond what is needed to score well on the test
working for the goal of getting straight A's on a report card

Answers

Answer:

doing extra studying beyond what is needed to score well on the test ( C )

Explanation:

i got it right on edginuity

An example of intrinsic motivation is doing extra studying beyond what is needed to score well on a test. The correct option is C.

What is intrinsic motivation?

Intrinsic motivation arises from inside; we motivate ourselves. For example, we might want to win a game to demonstrate our athletic ability, or we might want to learn a subject because we are intrigued.

Motivation, according to psychology, is an inducement or cause to do something. It can be accomplished in two ways: with an external stimulus and with internal stimulation.

The distinction is that external stimulation (extrinsic motivation) is dependent on an external source, such as when we offer sweets to children after they clean their bedrooms, or when we give food to the dog after he does something positive.

Therefore, the correct option is C, doing extra studying beyond what is needed to score well on the test

To learn more about intrinsic motivation, refer to the link:

https://brainly.com/question/3143857

#SPJ6

To protect the data, either the signature alone or the signature plus the message are mapped into printable ASCII characters using a scheme known as ________ or base64mapping.

Answers

Answer:

Base64 encoding

Explanation:

Base64 encoding is a binary to text encoding scheme. Binary data is represented in a printable ASCII string format by translation into radix-64 representation.

Base64 mapping works with a 64-character subset of US ASCII charset. The 64 characters are mapped to an equivalent 64-bit binary sequence. An extra 65th character is used for padding.

An alphabet is assigned to each of the 6-bit binary sequences from 0 to 63. The 6-bit binary to alphabet mapping is used in the encoding process.

Mike humiliates a former friend by posting embarrassing photos on social media. Which ethical standard did he violate?

Answers

Answer:

this is ethical behavior and could invade on Mike's privacy, if he did not give the former friend the rights to post that photo online

Explanation:

Words like "free" or "percent off" will not only trigger spam filters for your email, but will also ___________

Answers

Answer:

eliminasnados

Explanation:

True or false? If you’re posting the same content across different channels, make sure you post them simultaneously—on the same days and at the same times.

Answers

Answer:

The answer is true.

Explanation:

What are the 4 main components to developing a portfolio

Answers

Answer:

Step 1: Determining Asset Allocation

Step 2: Achieving the Portfolio

Step 3: Reassessing Weightings

Step 4: Rebalancing Strategically

The Bottom Line

Explanation:

61. Select an activity of the Production Phase: a. a web authoring tool is often used b. the graphics, web pages, and other components are created c. the web pages are individually tested d. all of the above

Answers

Answer:

d. all of the above.

Explanation:

Since the advent of digital technology, production of goods and services have experienced a significant change from the traditional methods of production. This paradigm shift is made possible by the application of various modern technology.

Production processes are generally being facilitated and enhanced by the use of;

1. Computer-integrated manufacturing (CIM).

2. Computer-aided process planning (CAPP).

3. Computer-aided design (CAD).

4. Computer numerical control (CNC).

In the process of selecting an activity of the production phase:

1. A web authoring tool is often used.

2. The graphics, web pages, and other components are created.

3. The web pages are individually tested.

Suppose you work at a startup with limited funding. Why might you prefer Azure data storage over an on-premises solution?
a. To ensure you run on a specific brand of hardware, which will let you form a marketing partnership with that hardware vendor
b. The Azure pay-as-you-go-billing models lets you avoid buying expensive hardware
c. To get exct control over the location of your data store

Answers

Answer:

The correct option is;

b. The Azure pay-as-you-go-billing models lets you avoid buying expensive hardware

Explanation:

The Azure pay-as-you-go billing model allows the flexibility in financing such that the organization is able to meet its financial needs and maintain goal oriented budget. The business is also able to experience immediate cost saving from lower initial deployment costs to minimal cost requirement associated with maintaining scaled and complex organizational supporting systems.

Anyone have Y.O.U.T.U.B.E or S.O.U.N.D.C.L.O.U.D. I need help putting my music and videos out there

Answers

Answer:

I do have Y.O.U.T.U.B.E.

Explanation:

1. Go on Y.O.U.T.U.B.E app.

2. Create account or log in to an existing account.

3. In the welcome screen, click the button of a camera on the top right corner next to your photo icon.

4. Click "Upload Video"

5. Then upload your video.

6. Add a description and details

7. Done! Just upload to on Y.O.U.T.U.B.E.

I hope this helps! Thank you:)

Q8:What is the correct way to declare an integer named age? ----- , ---- , ----- , ----- . hint= use this (variable , integer ) .

Answers

Answer:

age=int(14)

Explanation:

When declaring an integer variable you use int which stands for integer. You place the number (age) inside the parentheses of int.

Why was language important during the ancient times in regards to visual representation

Answers

Answer:

Explanation:

It was important back then because if their was an enemy attacking they could use their language instead of maybe shouting or throwing stuff and its easier to use language because you don't have to cause a ruckus.

Which type of systems development is characterized by significantly speeding up the design phase and the generation of information requirements and involving users at an intense​ level? .

Answers

Answer:

Joint Application Development (JAD)

Explanation:

Joint Application Development is a method of application development that  lay emphasis on the up-front aspect of the application development cycle whereby steady communication between the designers and the intended users of the application under development by coming together in collaborative workshop styled discussions known as JAD sessions involving the mediators, facilitator, observers, end users, experts, and developers. As such with JAD process application development result in fewer errors high quality and is completed in lesser time.

What are the similarities between Artificial intelligence and Human intelligence??

Answers

Answer: human intelligence revolves around adapting the environment and the artificial intelligence focuses on machines that copy human behavior

what is the full form of COF ?​

Answers

Answer:

COF - Central Operations Facility

Explanation:

COF - Central Operations Facility

Answer:

Central Operations Facility

Explanation:

COF is a place where all facilities usually come from. COF is the biggest facility industry in the world. Nevertheless, it needs other industry to rely on.

Hopefully this answer helps you :)

Universal Containers (UC) has multi-level account hierarchies that represent departments within their major Accounts. Users are creating duplicate Contacts across multiple departments. UC wants to clean the data so as to have a single Contact across departments. What two solutions should UC implement to cleanse their data? (Choose 2 answers) Use Data to standardize Contact address information to help identify duplicates Make use of the Merge Contacts feature of Salesforce to merge duplicates for an Account Use Workflow rules to standardize Contact information to identify and prevent duplicates Make use of a third-party tool to help merge duplicate Contacts across Accounts

Answers

Answer:

The answer is "first and the last choice".

Explanation:

For providing single contact across all department the Universal Containers (UC) uses two methods, that can be defined as follows:

It uses the standardized contact in data, that helps to identify multiple copies, of the Information and convert it into standardized contact information.  It uses the third-party tool, which helps to merge the duplicate contact information through accounts.

Question 1 A computer program is said to learn from experience E with respect to some task T and some performance measure P if its performance on T, as measured by P, improves with experience E. Suppose we feed a learning algorithm a lot of historical weather data, and have it learn to predict weather. What would be a reasonable choice for P

Answers

Answer:

Reasonable choice for P is the probability of it correctly predicting a future date's weather.

Explanation:

In Machine Learning, the computer or machine learns from experience  with respect to some task  and some performance measure. In this example the learning algorithm is fed to with a bulk of weather data with the goal to learn that data to be able to predict weather. So the task is to predict weather and performance measure is the probability of predicting the weather correctly. A learning algorithm can guess the weather correctly or incorrectly so as it keeps learning, it gains some experience and this experience improves its ability to perform the task. In this example the task of correctly predicting weather improves with experience. So its performance on task T of predicting weather, as measure by P which is the probability of correctly predicting future date's weather improves with experience E which is some function or procedure that it uses for weather prediction. Hence here performance measure P of this machine/program is the correct prediction of the weather of future date.


An employee who is devoted to doing his very best to uphold the company image is:

Answers

Answer:

Loyal

Explanation:

A loyal employee work in accordance with the ethics and core values of the company they are associated. The honor and respect all company decisions once the decisions have been made and they are the advocates of the company decisions and policies.

Loyal employees are collaborative with coworkers, vendors, partners, suppliers and customers in pushing for the success of companies projects, and goal achievement.

Loyal employees are dedicated to attending to detail and conform to ethical standards.

Financial stability is when u what

Answers

Are in good standing money wise!

hope helped c;

Answer:

Being financially stable means not having to worry about paying for expenses or taking care of your obligations. It doesn’t inherently mean you are rich, but it does mean that you’re able to handle finances without taking on more debt.

What is a difference between a waxing crescent and a waning gibbous? (1 point) waxing crescent: first quarter waning gibbous: third quarter waxing crescent: second quarter waning gibbous: third quarter waxing crescent: third quarter waning gibbous: first quarter waxing crescent: fourth quarter waning gibbous: first quarter

Answers

Answer:

  waxing crescent: first quarter waning gibbous: third quarter

Explanation:

The moon is waxing (getting larger) in the first quarter after the new moon. It is waning (getting smaller) in the third quarter, after the full moon at the end of the second quarter.

The shape of the moon is a "crescent" when it is less than a semicircle. It is "gibbous" when it is more than a semicircle. As it waxes, the crescent grows until the moon is half-full at the end of the first quarter, then it is a waxing gibbous moon through the second quarter until it is full at the end of the quarter. Following the full moon, it is waning gibbous until it becomes half-full again at the end of the third quarter. Finally, it is a waning crescent through the fourth quarter until the new moon.

  waxing crescent: first quarter waning gibbous: third quarter

Answer: A

Explanation: I got 100% on the quiz

scraper = cloudscraper.create_scraper( interpreter='nodejs', recaptcha={ 'provider': '2captcha', 'api_key': '1abc234de56fab7c89012d34e56fa7b8' } ) scraper = cloudscraper.create_scraper( interpreter='nodejs', recaptcha={ 'provider': 'anticaptcha', 'api_key': 'P6KLRNy7h3K160ZmYNUOAce7' } ) That won't run in a repl? Yes, I know, I just gave out my API key, I could care less.

Answers

Answer:

I don't think repl supports those things. You probably need to download something and run nodejs on your computer.

The #elif and #else directives are provided as shorthand notation for the #if defined(name) and #if !defined(name).


True


False

Answers

Answer:

The correct option is;

False

Explanation:

In fpp Directives, a shorthand for #if defined(name) is #ifdef and a shorthand for #if.not defined(name) is #ifndef. They have similar function to the #if directive in combination with the operator with which they are defined

Directives in fpp are preceded by the number sign (#) sign being the line's prefix character. fpp directives can be fixed in any location within a source code. Indentation which is a white space  (or blank character) can be represented by a blank space before the number sign.

When you have multiple authors working on the same file, how will you know who made specific changes? A) Accept all changes made within the document B) Refer to the Track Changes option C) Check the Properties option D) Select the Formatting option

Answers

Answer:

The correct option is;

B) Refer to the Track Changes option

Explanation:

Track Changes is a Word tool that makes changes made and by whom to an original document easily identifiable. Track Changes present changes in the form of proposal that can be accepted or rejected and it keeps record of the document amendment and enables control over the amendments of the document by the other contributors or coworkers.

With Track Changes on, words deleted will be represented by a strike through and added words are represented with an underline.

In a response of approximately 50 words, explain why it would be essential for the successful A/V technician to participate in additional coursework, presentations and seminars offered by equipment manufacturers as well as annual conferences attended by colleagues in the industry.

Answers

Answer:

The role of an audiovisual technician are to service, operate, maintain and repair and set electronic equipment meant for meetings, concerts, webinars, teleconferences, presentation, television and radio broadcasting. Audio technicians playback video recordings, they improve set lighting  they ensure proper graphics coordination and they mix audio sound boards making after-school activities essential to the audiovisual career development.

Explanation:

Why should programmers use a Post Mortem Review?

Answers

The goal of a postmortem is to draw meaningful conclusions to help you learn from your past successes and failures. Despite its grim-sounding name, a postmortem can be an extremely productive method of improving your development practices.

Answer:

To learn from their mistakes

Explanation:

I went back in the lesson and this is what I got. I found it back in the lesson!

Hope this helped :)

If you wanted to find out whether an integer contained an even number of 1 bits, which status flag would be useful

Answers

Answer:

The correct answer will be "Parity".

Explanation:

Parity seems to be a methodology that tests when information is transferred or missing or overwritten when something is transferred between one storage location to another, and then it is communicated between processors or devices.It would be used whilst also contrasting the container as well as the aggregated parity to evaluate or dual inspect for inaccuracies.

Analyzing computer systems to gather potential legal evidence is computer ________. enforcement forensics detective work analysis

Answers

Answer:

  forensics

Explanation:

Analyzing computer systems to gather potential legal evidence is computer forensics.

Which of the following insulation is not used in cables?
OPaper.
O Varnished cambric.
O Metal
O Rubber

Answers

Answer:

[tex]\huge \boxed{\mathrm{Metal}}[/tex]

Explanation:

Metal is a conductor of electricity, thus is not used in cables for insulation. Varnished cambric, paper, and rubber, are all insulators of electricity.

Write HTML code for inserting an image "cricket.jpeg" in size 500 width and 400 height.

Answers

Answer:

<img src="cricket.jpeg" style="width: 500px; height:400px">

Other Questions
Christine is typing at a rate of 75 words perminute. Paula is typing at twice Christine'sspeed. If together they need to transcribe a 2000word paper which of the following expressionswould illustrate the time in minutes, x, it wouldtake for them to do so.A) 1502000X75150B)+= 2000C) 150 + 75 =20002000D) x =(150+75) humans have a basic need to evolve and fulfill their potential *6. "The mixture is green in color." This confirms that the mixture is a Choose the very best answer to fully explain plagiarism... don't just pick an example of plagiarism.Question 1 options:Using someone else's words or ideas (even if I put them in my own words) and failing to give credit to the source.Using someone else's wordsCopying from the internet and using it as it is my own.Taking someone else's writing and claiming it as my own. What can you say about the value of a stock with constant dividend growth where the growth rate is larger than the discount rate A two-family residential property is now located in a central business district. The decision to convert this two-family residential house to a commercial office, housing a real estate firm and an insurance company, is an example of what appraisal principle? Solve and graph the following inequality What is the equation of the line that passes through the points (2, 1) and (1, 10)? How many grams of gold are there in 0.353 moles of gold? One day while you were alone and asleep at home fire broke out in your house. write a composition about how you escape how the fire was put out and how your parents reacted on their returned How does the rule of law affect society? Check all that apply. What unit of measurement would I use to measure the thickness of a hair? 1.A Letter of Credit (or LC) is one of the major pillars on which International Trade stands. a)What is a Letter of Credit? b)With the aid of a diagram, explain the LC procedure.c)Explain to the CEO of Mbo Limited (a company in Ghana) which wants to buy large quantities of White Refined Granulated Sugar from Tiffany Anderson Group Ltd (a company in Brazil) why the LC is the most acceptable method to both the exporter and importer in a transaction such as he is about to undertake. "Is life so dear, or peace so sweet, at to be purchased at the price of chains and slavery?" When taken in context, Henry is inferring: a. it is better to live a peaceful life without freedom than to attempt revolution for freedom b. peace is sweet and should be maintained at all costs c. the revolution will cost lives and so may not be a worthy cause d. this is a call to revolution Integrated math ll I need help ASAP PLEASE Inflecting run to running changes the word into a(n)? What is the controversy behind banning oxo-biodegradables? Kara needs to fence her yard. How many feet of fencing is needed?A. 370 feetB. 500 feetC. 13, 700 feetD. 15, 000 feet Bill experiences autonomic nervous system arousal whenever he is in an airplane. In behavior modification, autonomic nervous system arousal in response to a particular stimulus is labeled: "wow!that's amazing ",said ram. change into indirect speech