add a jframe to it , then add to the frame, through code, the necessary components (labels, textfields, etc...) to allow a user to enter the number of donuts purchased and the price of each donuts. add a sales button to compute the subtotal, the tax and the total cost

Answers

Answer 1

A form of container known as JFrame class derives from the Java Awt Frame class. JFrame functions as the main window where a GUI is added by adding components like labels, buttons, and text fields.

If all a graphical application has are labels, it is pretty dull. It is of little use to the end user if it lacks text fields, buttons, and accessories like tool tips. In this lesson, we'll go through how to add a text box to a slogan for a vintage TV program. To accomplish this, we'll build a text field, a button, and then tool tips for these components.

import javax.swing.JFrame;

public class example {

 public static void main(String[] args){

   JFrame frame = new JFrame();

   frame.setSize(100,100);

   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOES);

   frame.setTitle("Example Frame");

   frame.setVisible(true);

 }

}

Learn more about Jframe here-

https://brainly.com/question/7206318

#SPJ4


Related Questions

write a if/else if statement that compares the double variable ph with 7.0 and makes the following assignments to the bool variables neutral, base, and acid:

Answers

A if/else if statement that compares the double variable ph with 7.0    if (pH<7.0){ .A complete java program that prompts a user for the pH value is provided in the explanation section

import java.util.Scanner;

public class ANot {

  public static void main(String[] args) {

     Scanner in = new Scanner(System.in);

      System.out.println("Enter a value for the pH");

      boolean neutral, base, acid;

      double pH = in.next Double();

      if (pH<7.0){

          neutral=false;

          base=false;

          acid=true;

      }

      else if (pH>7.0){

          neutral=false;

          base=true;

          acid=false;

      }}

  else if (pH==7.0){

          neutral=true;

          base=false;

          acid=false;

      }

}

If a certain condition is true, the if/else statement causes a block of code to be executed. Another block of code can be run if the condition is false. The "Conditional" Statements in JavaScript, which are used to carry out various operations depending on various conditions, include the "if/else" statement.

Learn more about statement here-

https://brainly.com/question/2285414

#SPJ4

what allows the internet assigned numbers authority (iana) to segment any address space to define larger or smaller networks as needed, giving far more flexibility to allocate networks of virtually any size without wasting large blocks of ip addresses?

Answers

IP addresses for the Internet are distributed by the Internet Assigned Numbers Authority (IANA).

The IPv4 addresses with four groups of numbers, with which we are most familiar today, are no longer available, according to the IANA. There are five global regions (sometimes referred to as RIRs) inside IANA, and each one provides IP addresses for devices within that region. On February 3, 2011, IANA distributed the final blocks/groups of IPv4 addresses, one block of /8 addresses, to each region. With each area being exhausted, this practically means that IANA is currently out of addresses. The first to expire in 2011 was APINC (Asia Pacific area).and have since assigned actions to prolong them as much as feasible. After that, LACNIC (Latin America) expired in 2014. In 2015, the free address pool of ARIN (North America) was depleted. On November 25, 2019, RIPE (region of Europe) expired. Only AFRINIC (Africa) has not yet used up all of its addresses, although it is inevitable that they will soon be used up.

learn more about IANA Here:

https://brainly.com/question/28562975

#SPJ4

in june 2009, the u.s. federal communications commission (fcc) mandated that all over-the-air television broadcasts originating in the u.s. must be broadcast digitally instead of the traditional analog signal. these digital transmissions cannot be decoded by traditional analog tvs but require either a digital decoder be attached to an analog tv or a natively digital tv.

Answers

The Demonstration on the graph of how the market for analog TVs changed immediately following the announcement of the switch to digital is that Line D will shift to the left one as well as line S will shift to the right.

What is the meaning of hypothetical business?

The trial's objective under the hypothetical strategy is to calculate the treatment's impact in the fictitious absence of the concomitant occurrence.

In order to determine customer interest in and market demands for products that are currently in development, hypothetical scenario marketing uses product surveys and made-up scenarios. As a small business owner, adopting hypothetical marketing can assist you in directing resources into product categories where customers have expressed interest and demand.

Therefore, A speculation market is a hypothetical market. It refers to a hypothetical market, and in this sense, it signifies that if all the resources were made available that a person would come into.

Learn more about market from

https://brainly.com/question/25369230
#SPJ1

See full question below

The accompanying graph depicts a hypothetical market for analog TVs.

In June 2009, the U.S. Federal Communications Commission (FCC) mandated that all over-the-air television broadcasts originating in the U.S. must be broadcast digitally instead of the traditional analog signal. These digital transmissions cannot be decoded by traditional analog TVs but require either a digital decoder be attached to an analog TV or a natively digital TV.

Both sellers and consumers were made aware of the upcoming switch from analog transmission to digital several years before the mandate took effect.

Demonstrate on the graph how the market for analog TVs changed immediately following the announcement of the switch to digital. For the supply side, focus on the end seller (such as an electronic store) of a TV and not the manufacturer.

when you use a(n) language, you create programs by putting together a collection of objects. question 41 options: object-oriented collective object-based high-level

Answers

When you employ an object-oriented language, you build programs by assembling a group of objects.

In contrast to functions and logic, object-oriented programming (OOP) organizes software design around data or objects. Objects can be defined as data fields with specific traits and behaviors.

Instead of focusing on the logic required to handle the objects, OOP focuses on the objects that developers want to control. This approach of programming works best with large, complex, and frequently updated programs. This encompasses mobile applications as well as design and production software. Software to simulate manufacturing systems, for instance, can be developed using OOP.

Due to object-oriented software's organizational structure, the approach is excellent for collaborative development when projects are broken up into groups.

learn more about object-oriented programming

https://brainly.com/question/11023419

#SPJ4

question 3. a full ternary tree is a tree whose internal nodes each have exactly three children. (a) write a recursive definition for a full ternary tree. (b) write a recursive definition for the number of internal nodes i(t) in a full ternary tree. (c) write a recursive definition for the number of external nodes e(t) in a full ternary tree. (d) write a recursive definition for the total number of nodes n(t) in a full ternary tree.

Answers

Each node in a ternary tree can have a maximum of three children, which are typically labeled "left," "mid," and "right."

A 3 height perfect binary tree contains 23+1 - 1 = 15 nodes. The tree must therefore be stored in 300 bytes. The tree will have 7 nodes if it is at least 3 feet tall and has the required number of nodes. Node 1 serves as the ternary tree's root node, and it has three children: Nodes 2, 3, and 4. Therefore, Node 3's parent node and the ternary tree's root node are the same. There are 2n+1 nodes in a full binary tree with n non-leaf nodes. Each non-leaf node in a binary tree provides two edges.

Learn more about node here-

https://brainly.com/question/28485562

#SPJ4

some computer systems do not provide a privileged mode of operation in hardware. is it possible to construct a secure operating system for these computers? give arguments both that it is and that it is not possible.

Answers

some computer systems do not provide a privileged mode of operation in hardware. yes it possible to construct a secure operating system for these computers

This is theoretically possible by carefully monitoring and scrutinizing the output of just one process while it is being performed. To ensure that we are aware of each process's priority, we must take into account the fact that this will undoubtedly reduce the system's efficiency (it will function considerably more slowly) (which is rather hard if we do not have modes).

This type of equipment would require an operating system that could only operate in control (or monitor) mode. There are two ways that this could be done:

a. Software emulation of all user programs (such as some BASIC, Java, and LISP systems, for instance). What the hardware lacks, the software interpreter would supply in software.

b. Require meant that all programs must be written in high-level languages in order for compilers to output all object code. The protection checks for the missing hardware would be generated by the compiler (either internally or through function calls). It would be an absurdly difficult code.

 

learn more about  privileged mode of operation

https://brainly.com/question/13197356

#SPJ4

a(n) can execute a set of statements only under certain circumstances. question 9 options: circumstantial structure decision structure event structure sequence structure

Answers

Only in certain circumstances will the decision structure be able to execute a set of statements. The term "decision structure" refers to a framework that works under certain circumstances.

The decision structure of a computer program is the functionality that enables the program to make decisions and change its behavior according to those choices. Selection is determined in light of the results of a logical test. A computation that yields a true/false result is called a logical test. The programmer must define one or more conditions to be evaluated or tested programmatically, associated with one or more statements that are executed if the condition is true.

Learn more about Decision structure here-

https://brainly.com/question/14567046

#SPJ4

which type of evidence is stored in a computer's memory, as well as on storage devices as in files, and must be accompanied by documentation that validates the evidence's authenticity?

Answers

Information that has been stored or transmitted in binary format and is admissible in court is known as digital evidence. Digital evidence is frequently linked to electronic crime, sometimes known as e-crime.

Processes and programs now executing on the system, network connections, signs of malware infection, registry hives, usernames and passwords, decrypted files and keys, and signs of activity not generally saved on the local hard disk are all examples of evidence that can be discovered in RAM. When dealing with the search and seizure of computers at a crime scene, law enforcement often just unplugs the computer and books it into the evidence center. The investigator then demands that a certified digital evidence examiner examine the computer.

Learn more about Evidence here-

https://brainly.com/question/6764645

#SPJ4

Other Questions
What is the slope of the points that go through (2,4) and (4, 8) please help The mass of a single barium atom is 2.2810-22 grams. How many barium atoms would there be in 166 milligrams of barium? Kieran is driving his Chevrolet Spark around a level turn with a radius of curvature of 70.9 m at a speed of 22.4 m/s. Calculate the acceleration of the car.Question 18 options:3.2 m/s/s224.4 m/s/s0.3 m/s/s7.1 m/s/s Frga 5 20 pong A farmer wants to plant a small rectangular plot of ornamental blue corn. He has enough fencing material to enclose a space with a perimeter of 144 feet. He wants to know the dimensions of the largest rectangle that can be enclosed with 144 feet of fence. To help find them, he graphed the following equation. Area = x (72 - x) What are the dimensions of the largest area the farmer can enclose with 144 feet of fence? the power usage of a dc strip heater can be determined in either of two ways: (1) heater resistance and voltage drop can be measured simultaneously and power computed, or (2) heater voltage drop and current can be A strategy for fighting bacterial infections uses viruses. Viruses that infect bacteria are called bacteriophages. Phage comes from the Greek word for eater. Explain why it is not accurate to call a virus that kills bacteria a bacteria eater." What happens when a virus attacks a cell? Melissa rented a Segway, a stand up scooter, in downtown Austin, Tx. The store charges a $3.25 initial charge plus $2.50 per mile. Which equation can be used to find y, the total cost of the rental, if x represents the number of miles Melissa rode on the Segway?pls it has to be like "y=mx+b" What is the structure labeled A in the cells above? what is the value of n? How does the gametophyte obtain nutrition? Please help Ill mark you as brainliest if correct!! The square root of a number is between seven and eight .which could be the number? Using the digits 1 to 9 as many times as you want, fill in the boxes to create three equivalent ratios. _ : _ = _ _ : _ = _ _ : _ _ Which of the following is an example of an informal definition?The American Advertising Alliance defines an association ad (noun) as "an advertising technique using celebrities to persuade consumers to buy the advertised product."Sara McGregor, Senior Brand Manager, says that association ads are less likely to persuade millennial consumers because this segment tends to be wary of celebrity endorsements.One common, and very persuasive, type of advertisement is known as the association ad. This advertisement could be a picture of a famous person wearing a designer's shoes or clothing, or driving a certain type of car.An association ad is an advertising technique using celebrities to persuade consumers to buy the advertised product. In these ads, a famous person is shown using or modeling products like clothing, home goods, or automobiles. The goods are then "associated" with the celebrity. Which of the following is the correct factorization of the polynomial below?2p-11pq+24qA. (2p-4q)(p-4q)B. (2p-4q)(p+ 4q)C. (2p-4q)(2p + 2q)D. The polynomial is irreducible. what does Acceptance mean? How does the author support the idea that most growing-up moments start with somethinghard?Makes a list of changes that everyone faces in their youth.B Gives supporting details followed by pertinent examples of challenging events thatcould lead to a difficult realization.Tells a story about their time as a child.ABRUsing data charts and tables to show evidence of difficult time in their life and howchallenging they were. PLEASE ANSWER QUICK I DONT PAY ATTENTION HELP The purpose of a Works Cited page is to a give your audience suggestions for further research b list all the sources you used in your writing c provide explanations of why you selected your sources d summarize each source in a sentence, Hi, I am taking PSAT and I am working on the math section. I need help with answering this math type of question. Please give the best explanation. name the monomer and describe the importance of the order of these monomers and how dna is related to this order