Questions from Starting Out With Java


Q: What type of argument does a component’s setFont method accept

What type of argument does a component’s setFont method accept?

See Answer

Q: What are the arguments that you pass to the Font class constructor

What are the arguments that you pass to the Font class constructor?

See Answer

Q: What type of event does a JSlider generate when its slider knob

What type of event does a JSlider generate when its slider knob is moved?

See Answer

Q: How do you retrieve the selected item from a JList component?

How do you retrieve the selected item from a JList component? How do you get the index of the selected item?

See Answer

Q: How would each of the following numbers be represented in E notation

How would each of the following numbers be represented in E notation? 1. 3.287 ×106 2. −9.7865 × 1012 3. 7.65491 × 10−3

See Answer

Q: A superclass has the following method: public void setValue(

A superclass has the following method: public void setValue(int v) { value = v; } Write a statement that may appear in a subclass that calls this method, passing 10 as an argument.

See Answer

Q: What JSlider methods do you use to perform each of these operations

What JSlider methods do you use to perform each of these operations? 1. Establish the spacing of major tick marks. 2. Establish the spacing of minor tick marks. 3. Cause tick marks to be displayed. 4....

See Answer

Q: How do you cause a scroll bar to be displayed with a

How do you cause a scroll bar to be displayed with a JList component?

See Answer

Q: How do you retrieve the selected item from a JComboBox component?

How do you retrieve the selected item from a JComboBox component? How do you get the index of the selected item?

See Answer

Q: What is the difference between an uneditable and an editable combo box

What is the difference between an uneditable and an editable combo box? Which of these is a combo box by default?

See Answer