Question

Question 216 pts (TCO 2) In order to guarantee that only one JRadioButton is selected at...

Question 216 pts

(TCO 2) In order to guarantee that only one JRadioButton is selected at any time, _____.

add each JRadioButton object to a different panel
create a ButtonGroup object and add the JRadioBttons to it
have a JCheckBox object manage the three JRadioButtons
This cannot be done in Java.

Flag this Question

Question 226 pts

(TCO 2) Which Java interface would you need to implement in order to handle events such as key-pressed or key-released events?

KeyListener interface
KeyStroke interface
KeyEvent interface
This information is not available in a Java program.

Flag this Question

Question 236 pts

(TCO 2) The Graphics class in Java provides methods to _____.

draw lines between any two points
draw test strings starting at any point
draw shapes such as rectangles, ovals, and so on.
All of the above

Flag this Question

Question 246 pts

(TCO 2) Which of the following Java statements gets an integer value from the user?
public class MyApp extends JFrame implements ActionListener { … }

int x = Integer.parseInt(JOptionPane.showInputDialog(“Enter an integer value”));
int x = JOptionPane.getInteger(“Enter an integer value”);
int x = Scanner.getInt(“Enter an integer value”);
int x = String.toInt(JOptionPane.showMessageDialog(“Enter an integer value”));

Flag this Question

Question 256 pts

(TCO 2) What range of numbers does the following expression generate?
                        Int num = 1 + (int) (Math.Random ( ) * 100);

Minimum is 0, maximum is 100
Minimum is 1, maximum is 101
Minimum is 1, maximum is 100
Minimum is 1, maximum is 101
0 0
Add a comment Improve this question Transcribed image text
Answer #1
21) add each JRadioButton object to a different panel
22) KeyListener interface
23) All of the above
24) int x = Integer.parseInt(JOptionPane.showInputDialog(“Enter an integer value”));
25) Minimum is 1, maximum is 100
Add a comment
Know the answer?
Add Answer to:
Question 216 pts (TCO 2) In order to guarantee that only one JRadioButton is selected at...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Eclipse Java Oxygen Question 11 pts A compile-time error occurs when Group of answer choices c....

    Eclipse Java Oxygen Question 11 pts A compile-time error occurs when Group of answer choices c. there’s a syntax error in a Java statement a. the Java compiler can’t be located b. bytecodes can’t be interpreted properly c. there’s a syntax error in a Java statement Flag this Question Question 21 pts An error that lets the application run but produces the wrong results is known as a Group of answer choices d. syntax error c. logic error a. runtime...

  • Those questions are about Java. Question 2 Which of the following is NOT a wrapper class?...

    Those questions are about Java. Question 2 Which of the following is NOT a wrapper class? Integer Double String Character Flag this Question Question 3 Which of the following kinds of things may be stored directly in an ArrayList? None of the above primitive values Either of these two kinds of data object references Flag this Question Question 4 In this declaration: ArrayList<Point> polygon; what do we call 'Point'? a type argument a wrapper class a collection a variable Flag...

  • JAVA 3 PLEASE ANSWER AS MANY QUESTIONS AS POSSIBLE! ONLY 2 QUESTIONS LEFT THIS MONTH!!! Question...

    JAVA 3 PLEASE ANSWER AS MANY QUESTIONS AS POSSIBLE! ONLY 2 QUESTIONS LEFT THIS MONTH!!! Question 12 pts Which is a valid constructor for Thread? Thread ( Runnable r, int priority ); Thread ( Runnable r, String name ); Thread ( int priority ); Thread ( Runnable r, ThreadGroup g ); Flag this Question Question 22 pts What method in the Thread class is responsible for pausing a thread for a specific amount of milliseconds? pause(). sleep(). hang(). kill(). Flag...

  • his Question: 1 pt 2 of 43 complete This Quiz: 4 pts Use the graph of...

    his Question: 1 pt 2 of 43 complete This Quiz: 4 pts Use the graph of yf) to answer the questions Complete parts and be a. For what value of x does fobtain a relative minimum? What are the relative minima? Select the core below and nossary che in the answer boxes to complete your choice A There is only one relative minimum. The minimum values and t ours (Type Integers or actions.) OB. There are two relative minima. The...

  • Some java questions: 18. Consider the following class definitions public class TestAB public static void main (String a...

    Some java questions: 18. Consider the following class definitions public class TestAB public static void main (String args) A bl new B() в ь2 -new B() ; b1.х, А.у, Ь2.х, в.у); System.out.printf ("%d, Sd, %d, d\n", class A public int x = 2; public static int y = 4; public A () ( X=y- class Bextends A public int x = 32; public static int y = 45; public B ( x ++y What is the result of attempting to...

  • 1) Consider the following Java program: 1 public class HelloWorld { 2     // My first program!...

    1) Consider the following Java program: 1 public class HelloWorld { 2     // My first program! 3     public static void main(String[] args) { 4         System.out.println("Hello, World!"); 5     } 6 } What is on line 1? a. a variable declaration b. a statement c. a method (subroutine) definition d. a comment e. a class definition 2) Which one of the following does NOT describe an array? a. It can be used in a for-each loop. b. It has a numbered sequence...

  • 1 Overview For this assignment you are required to write a Java program that plays (n,...

    1 Overview For this assignment you are required to write a Java program that plays (n, k)-tic-tac-toe; (n, k)-tic- tac-toe is played on a board of size n x n and to win the game a player needs to put k symbols on adjacent positions of the same row, column, or diagonal. The program will play against a human opponent. You will be given code for displaying the gameboard on the screen. 2 The Algorithm for Playing (n, k)-Tic-Tac-Toe The...

  • ***This is a JAVA question*** ------------------------------------------------------------------------------------------------ import java.awt.*; import java.awt.event.*; import java.awt.image.*; import javax.imageio.*; import javax.swing.*;...

    ***This is a JAVA question*** ------------------------------------------------------------------------------------------------ import java.awt.*; import java.awt.event.*; import java.awt.image.*; import javax.imageio.*; import javax.swing.*; import javax.swing.event.*; public class DrawingPanel implements ActionListener { public static final int DELAY = 50; // delay between repaints in millis private static final String DUMP_IMAGE_PROPERTY_NAME = "drawingpanel.save"; private static String TARGET_IMAGE_FILE_NAME = null; private static final boolean PRETTY = true; // true to anti-alias private static boolean DUMP_IMAGE = true; // true to write DrawingPanel to file private int width, height; // dimensions...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT