All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Hire a Tutor
AI Study Help
New
Search
Search
Sign In
Register
study help
computer science
starting out with java from control structures
Questions and Answers of
Starting Out With Java From Control Structures
How do you force the paint or paintComponent method to be called?
The following Applet class method returns a URL object with the location of the applet’s .class file.a. GetHTMLlocationb. GetDocumentBasec. GetAppletBased. GetCodeBase
When using a Graphics object to draw an oval, what invisible shape is the oval enclosed in?
True or False: Applets cannot create files on the user’s system.
What values are contained in the two arrays that are passed to a Graphics object’s drawPolygon method?
True or False: Applets can read files on the user’s system.
What Graphics class methods do you use to perform the following tasks? a) Draw a line.b) Draw a filled rectangle.c) Draw a filled oval.d) Draw a filled arc.e) Set the drawing color.f) Draw a
True or False: Applets cannot make network connections with any system except the server from which the applet was transmitted.
What is the difference between a mouse press event and a mouse click event?
True or False: Applets can retrieve information about the user’s system or the user’s identity.
What interface would a listener class implement to handle a mouse click event? A mouse press event? A mouse dragged event? A mouse release event? A mouse move event?
What type of object do mouse listener and mouse motion listener methods accept? What methods do these types of objects provide for determining a mouse cursor’s location?
True or False: You use a static main method to create an instance of an applet class.
If a class implements the MouseListener interface but does not need to use all of the methods specified by the interface, can the definitions for those methods be left out? If not, how are these
True or False: In a class that extends JApplet, you add components to the content pane.
What is an adapter class, and how does it make some programming tasks easier?
True or False: In an applet, events are handled differently than in a GUI application.
What type of events do Timer objects generate?
True or False: An object of the Frame class does not have a content pane.
How are the time intervals between a Timer object’s action events measured?
True or False: In an overriding paint method, you should never call the superclass’s version of the paint method.
True or False: Once a Timer object has been started, it cannot be stopped without shutting down the program.
How to you cause a Timer object to cease generating action events?
True or False: The Applet class’s play method loads and plays an audio file once and then releases the memory it occupies for garbage collection.
What Applet method can you use to play a sound file?
True or False: The loop and stop methods, for use with audio files, are part of the Applet class.
What is the difference between using the Applet method asked for in Checkpoint 14.35, and using an AudioClip object to play a sound file?Data in Checkpoint 14.35What Applet method can you use to play
What methods does an AudioClip object have? What do they do?
What is the difference between the Applet class’s getDocumentBase and getCodeBase methods?
What is a GUI?
A(n) ____________ is a method that automatically executes when a specific event occurs.a. Controllerb. Event listenerc. Initialize methodd. Autoresponder
The following import statements are in a controller class that uses a Button component and a Label component.Import java.fxml.FXML;Import java.scene.control.Button;Import java.scene.control.Label;
You created a GUI in Scene Builder and saved it to a file named MyGUI.fxml. Write a main application class that loads the FXML file, builds the scene graph, and displays the GUI.
Find the errors in the following controller class. 1 import javafx.fxml.FXML; 2 import javafx.scene.control. Button; 3 4 5 { 6 7 8 9 10 11 12 13 14 N222HERE public class
What is a scene graph?
Create a JavaFX application where the user enters the wholesale cost of an item and its markup percentage into TextFields. (For example, if an item’s wholesale cost is $5 and its markup percentage
What is JavaFX?
A ________________ is a tree-like hierarchical data structure that contains the components of a JavaFX GUI.a. Directory treeb. Node treec. Node graphd. Scene graph
Look at the following list of Latin words and their meanings. Create a JavaFX application that translates the Latin words to English. The GUI should have three Buttons, one for each Latin word.
You created a GUI in Scene Builder and saved it to a file named Testing.fxml. The GUI has a Button component with the fx:id myButton, and a Label component with the fx:id myLabel. You have already
List and describe the three types of nodes that can appear in a scene graph.
A _______________ is the parent of all the other nodes in a scene graph.a. Root nodeb. Branch nodec. Leaf noded. Primary node
What is FXML?
What is an event? What is an event listener?
A _______________ can contain other nodes.a. Root nodeb. Branch nodec. Leaf noded. Mother node
What is an fx:id? Why is it important that you assign an fx:id to a component in Scene Builder?
Create a JavaFX application that lets the user enter the food charge for a meal at a restaurant. When a button is clicked, the application should calculate and display the amount of an 18 percent
What is a scene graph?
A _______________ cannot have children.a. Root nodeb. Branch nodec. Leaf noded. Terminal node
What is the purpose of the main application class in a JavaFX application?
Assuming there are no accidents or delays, the distance that a car travels down an interstate highway can be calculated with the following formula: Distance = Speed × TimeCreate an application
What are the three types of nodes in a scene graph?
_____________ is a markup language that describes a JavaFX scene graph.a. FXMLb. JFXMarkUpc. HTMLd. SceneXML
What is the purpose of the controller class in a JavaFX application?
Create a JavaFX application that simulates a coin being tossed. When the user clicks a button, the application should generate a random number in the range of 0 to 1. If the number is 0, the coin has
What type of scene graph node can have children? What type cannot?
The ____________ panel in Scene Builder provides a list of JavaFX components that you can use in an application.a. Contentb. Inspectorc. Libraryd. Hierarchy
What is an event listener?
What is FXML?
The ____________ panel in Scene Builder is where you visually design an application’s GUI.a. Contentb. Inspectorc. Libraryd. Hierarchy
Describe the steps for registering a controller class to an application’s GUI in Scene Builder, and then registering event listeners to specific components.
What type of file does Scene Builder save a GUI to?
The ____________ panel in Scene Builder shows the scene graph.a. Contentb. Inspectorc. Libraryd. Hierarchy
Why should a group of RadioButtons belong to the same toggle group?
Which Scene Builder panel provides a list of JavaFX components?
The ____________ panel in Scene Builder allows you to work with a component’s properties, layout, and code.a. Contentb. Inspectorc. Libraryd. Hierarchy
Which Scene Builder panel do you use to visually design an application’s GUI?
A(n) ________________ is a name that identifies a component in the FXML file.a. Fx:nameb. Fx:idc. Fx:componentd. Fx:variable
Which Scene Builder panel shows the scene graph?
In a JavaFX application, the _________ class loads the FXML file and builds the scene graph.a. Main applicationb. Controllerc. Event listenerd. Loader
Which Scene Builder panel allows you to work with a component’s properties, layout, and code?
In a JavaFX application, the _________ class is responsible for handling events that occur while the application is running.a. Main applicationb. Controllerc. Event listenerd. Loader
What is an fx:id?
A _________________ is a component that can be either selected or deselected. These components usually appear in a group so that only one of them in the group can be selected at a time.a. Buttonb.
In general, what operations does the main application class perform?
You call the ___________ method to determine whether a RadioButton is selected.a. IsRadioSelectedb. IsOnc. IsSelectedd. IsClicked
What is the controller class?
You call the ___________ method to determine whether a CheckBox is selected.a. IsCheckBoxSelectedb. IsOnc. IsSelectedd. IsClicked
What is an event listener?
You can use the ______________ component to display images in an application’s GUI.a. ImageViewb. Imagec. PictureBoxd. GraphicBox
How do you register a controller class to an application’s GUI in Scene Builder?
You call the ________ method to change an ImageView component’s image.a. Imageb. ChangeImagec. ShowImaged. SetImage
How do you register an event listener to a component in Scene Builder?
True or False: A mutually exclusive relationship is automatically created between all RadioButton components that are in the same toggle group.
You want the user to be able to select only one item from a group of items. Which type of component would you use for the items, RadioButtons or CheckBoxes?
True or False: A component’s fx:id can become a variable name that you can use in an application’s controller class.
You want the user to be able to select any number of items from a group of items. Which type of component would you use for the items, RadioButtons or CheckBoxes?
What is the purpose of a toggle group?
True or False: The controller class usually loads the FXML file and builds the scene graph.
True or False: You can use Scene Builder to register a controller class to a GUI.
Do you normally add RadioButtons or CheckBoxes to a toggle group?
True or False: Registering a controller class to a GUI automatically registers event listeners to all of the GUI’s components.
What ImageView property do you set in the Inspector panel to display an image?
True or False: You can register an event listener to a RadioButton. The event listener will execute when the user clicks the RadioButton.
What method do you call to change an ImageView’s image?
True or False: You cannot register an event listener to a CheckBox.
Assume that d is a double variable. Write an if statement that assigns d to the int variable i if the value in d is not larger than the maximum value for an int.
True or False: By default all members of an interface are public.
True or False: A class may only implement one interface.
True or False: When a class contains an abstract method, the class cannot be instantiated.
Showing 400 - 500
of 1252
1
2
3
4
5
6
7
8
9
10
11
12
13