Question & Answer: When you write an action listener class for a JButton component, it must a method named buttonclicked implement the ActionListen…..

Question 20 When you write an action listener class for a JButton component, it must a method named buttonclicked implement the ActionListener interface Ohave a method named actionPerformed which must take an argument of the ActionEvent type Both B and C Question 21 What is the value of str after the following code has been executed? string stri string sourcestrHey diddle, diddle, the cat and the fiddle str = sourceStr.substring < 12,17); didd didd Iddle diddle Question 22 The GridLayout manager limits each cell to only one component. To put two or more components in a cell you can nest panels inside the cells, and add other components to the panels O resize the cells so they can hold more resize the components to fit in the cel The statement is false, the GridLayout manager does not have this restriction Question 23 What will be the tokens in the following statement? stringTokenizer strTokennew StringTokenizer (123-456-7890, -, true) 123, 456, 7890, and O 123, 456, and 7890 O None of the above Question 24 What will be printed after the following code is executed? string strabc456 while m< 6) if (Character.isLetter (str.charAt (m)) System.out.print( Character.touppercase (str.charAt (m))) i 456 O ABC abc456 ABC456 Question 25 What is the purpose of a Layout Manager?

When you write an action listener class for a JButton component, it must a method named buttonclicked implement the ActionListener interface have a method named actionPerformed which must take an argument of the ActionEvent type Both B and C What is the value of str after the following code has been executed? string str: string sourcestr = “Hey diddle, diddle, the cat and the fiddle”: str = sourceStr.substring (12, 17): diddl didd lddle diddle The GridLayout manager limits each cell to only one component. To put two or more components in a cell you can nest panels inside the cells, and add other components to the panels resize the cells so they can hold more resize the components to fit in the cell The statement is false, the GridLayout manager does not have this restriction. What will be the tokens in the following statement? stringTokenizer strToken = new StringTokenizer (“123-456-7890”, “-“, true): 123, 456, 7890, and- – 123, 456, and 7890 None of the above What will be printed after the following code is executed? string str” = “abc456” int m = 0: while (m

Expert Answer

 

Still stressed from student homework?
Get quality assistance from academic writers!