Concept explainers
Suppose you change the order of the drawing commands in Listing 3.6 to the following. Will the gc.setFill picture change? If so. how will it change?
//Draw mouth:
gc.setFill (Color.RED);
gc.strokeArc (X_MOUTCH, Y_MOUTH, MOUTH_WIDTH,
MMOUTH_HEIGHT, MOUTH_START_ANGLE,
MOUTH_EXTENT_ANGLE), ArcType. OPEN;
//Draw face interior and outline:
gc.setFill (Color.YELLOW);
gc.filloval(X_FACE, Y_FACE,
FACE_DIAMETER, FACE_DIAMETER);
gc.setFill (Color.BLACK);
gc.strokeoval (X_FACE, Y_FACE,
FACE_DIAMETER, FACE_DIAMETER);
//Draw eyes:
gc.setFill (Color.BLUE);
gc.fillOval (X_RIGHT_EYE, Y_RIGHT_EYE,
EYE_WIDTH, EYE_HEIGHT);
gc.fillOval (X_LEFT_EYE, Y_LEFT_EYE,
EYE_WIDTH, EYE_HEIGHT);
//Draw nose:
gc.setFill (Color.BLACK);
gc.fillOval(X_NOSE, Y_NOSE,
NOSE_DIAMETER, NOSE_DIAMETER);
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Java: An Introduction to Problem Solving and Programming (8th Edition)
Additional Engineering Textbook Solutions
Database Concepts (8th Edition)
SURVEY OF OPERATING SYSTEMS
Vector Mechanics for Engineers: Statics and Dynamics
INTERNATIONAL EDITION---Engineering Mechanics: Statics, 14th edition (SI unit)
Mechanics of Materials (10th Edition)
Modern Database Management
- Add the purple code to your Main Code Section (type it by hand if you get weird errors). It will call the object’s monitorLevels() method, which we will create in this sprint: userInput = 99while userInput != 0:checkerObj.displayList()userInput = checkerObj.displayMenu()if(userInput == 1):checkerObj.addLevel()checkerObj.writeLevelsToFile() # Write levelsList to LevelsFileelif(userInput == 2):checkerObj.removeLevel()checkerObj.writeLevelsToFile() # Write levelsList to LevelsFileelif(userInput == 3):checkerObj.removeAllLevels()checkerObj.writeLevelsToFile() # Write levelsList to LevelsFileelif(userInput == 4):checkerObj.updateMenuPrice() elif(userInput == 5):userInput = 0 # prevent the app from continuing if the user pressed Ctrl+C to stop itcheckerObj.monitorLevels()arrow_forwardchange below code to the example photo page. the photo is just example but the layout should be like that @extends('base') @section('main') <div class="py-12"> <div class="max-w-7xl mx-auto sm:px-6 lg:px-8"> <div class="bg-white overflow-hidden shadow-xl sm:rounded-lg"> <div class="row"> <div class="col-sm-12"> @if(session()->get('success')) <div class="alert alert-success text-center"> {{ session()->get('success') }} </div> @endif </div> <div class="col-sm-12"> <br /> <h3 class="display-5 text-center">Room List</h3> <table class="table table-striped">…arrow_forwardplease add flags for all countries also like in the image GUI application Python :- from tkinter import*w=Tk()w.title("North American Countries ")w.configure(bg='#49A')w.geometry('500x400') f1=LabelFrame(w,text="",width=100,highlightbackground='blue')f1.grid(row=0,column=0,padx=20,pady=10,ipadx=20,ipady=10) def fun1(): label1 = Label( w, text=" Ottawa ",padx=100, relief=RAISED ) label1.grid(row=2,column=1)def fun2(): label1 = Label( w, text=" Washington, D.C ",padx=70, relief=RAISED ) label1.grid(row=2,column=1)def fun3(): label1 = Label( w, text=" Mexico City ",padx=70, relief=RAISED ) label1.grid(row=2,column=1)def fun4(): label1 = Label( w, text="",padx=70, relief=RAISED ) label1.grid(row=2,column=1) label1 = Label( w, text="",padx=100, relief=RAISED )label1.grid(row=2,column=1) ca =Button(f1, text =" Canada ",width=20,command=fun1)ca.grid(row=1,column=1) us =Button(f1, text =" U.S.A ",width=20,command=fun2)us.grid(row=2,column=1) me =Button(f1, text ="…arrow_forward
- Please fix these in the above splution, it is not fully correct. "You're invited" needs to be formatted correctly. With a larger font, using BS classes only. Use Bootstrap classes to make a circular image with a border - around the image only. "Don't tell the cats" color should be set with BS classes.arrow_forward1. Write a program that displays four images along with their label texts in a grid pane, as shown below. You may use the images available in the folder "LabFiles" | Flags Sultanate of Oman Republic of Yemen Kingdom of Saudi Arabia United Arab Emirates Check Point: How the nodes (elements) are arranged in a grid pane? How can you add nodes to the grid pane? 2. Create different versions of this program to test different type of pane layouts.arrow_forwardSuppose a GUI has a text field where use can add data in the form of paragraphs. The GUI also contains a button component which when clicked counts the unique number of words in the data provided in the text field and displays the total count in the same text field but this time the text field is read-only. Provide the code for the JButton component.arrow_forward
- Change the code so it loads the image from a folder named img instead of a url. .bgimg {background-position: center;background-size: cover;background-image: url("/w3images/coffeehouse.jpg");min-height: 75%;}arrow_forwardFlutter: How do I change the Icon image with the other one when I click on it? For instance: I have this code: child: IconButton( icon: Image.asset('assets/images/baguette.png'), iconSize: 150, onPressed: () { openDialog(); }, )) Then the open Dialogue function opens a widget box in a smaller window that has many other icons you can select from? the widget buttons are also implemented IconButton. I want to click on one of the icons in the widget (different dart file) and replace the main Icon that we clicked to open this dialogue to that specific Icon image! I don't know how to go about it. I will appreciate the help.arrow_forwardFor this task, you need to develop a JavaFX application in NetBeans that implements a LinkedHashMap class. The Java application should consist of a graphical user interface that can be used to add elements to the LinkedHashMap. There should be two TextFields to take in the element name and number. Then there should be four buttons to do four tasks, namely: add, change, remove and show all elements in the LinkedHashMap. Your buttons should have Action methods and should make use of methods in the LinkedHashMap class.When the Add button is clicked, the element name and value should be added to the LinkedHashMap. Make use of the LinkedHashMap methods to add the elements. When the user fills in the element name and number and the Add button is clicked, a message should be displayed in an alert dialog box to the user to inform them of this If no element is specified at the time the Add button is clicked, an error message should be displayed to inform the user to enter the elementarrow_forward
- OBAFGKM are the seven categories that are used to describe the absorption lines of a spectrum. Access the Spectral Types Color Slider by opening the Eclipsing Binary Stars section of the NAAP Labs Application and then the Spectral Types of Stars subsection (it is the last simulation on the page) and use it to complete the data table below. Spectral Type: include a letter and a number (no space). Temperature: Kelvin (K) is assumed for Temperature. Color: choose from Blue, White, Orange, or Red (spelling counts!).arrow_forwardHow is it decided what image from the ImageList will be shown in the PictureBox, and what value is used to make that decision?arrow_forwardNonearrow_forward