Questions from Starting Out With Java


Q: How do you determine in code whether a check box is selected

How do you determine in code whether a check box is selected?

See Answer

Q: What method do you use to set a border around a component

What method do you use to set a border around a component?

See Answer

Q: What is the preferred way of creating a Border object?

What is the preferred way of creating a Border object?

See Answer

Q: How do you display a frame on the screen?

How do you display a frame on the screen?

See Answer

Q: What is a content pane?

What is a content pane?

See Answer

Q: What is the difference between a frame and a panel?

What is the difference between a frame and a panel?

See Answer

Q: What is an event listener?

What is an event listener?

See Answer

Q: If you are writing an event listener class for a JButton component

If you are writing an event listener class for a JButton component, what interface must the class implement? What method must the class have? When is this method executed?

See Answer

Q: How do you register an event listener with a JButton component?

How do you register an event listener with a JButton component?

See Answer

Q: Write a method that accepts a reference to a String object as

Write a method that accepts a reference to a String object as an argument and returns true if the argument ends with the substring “.comâ€. Otherwise, the method should return false.

See Answer