Solved

Consider the Following Code Snippet: Final RectangleComponent Component = New

Question 24

Multiple Choice

Consider the following code snippet: final RectangleComponent component = new RectangleComponent() ;
MouseListener listener = new MousePressListener() ;
Component.addMouseListener(listener) ;
______________
Frame.add(component) ;
Frame.setSize(FRAME_WIDTH, FRAME_HEIGHT) ;
Frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) ;
Frame.setVisible(true) ;
Which of the following statements completes this code?


A) private static final int FRAME_WIDTH = 300;
B) private static final int FRAME_HEIGHT = 400;
C) Frame frame = new Frame() ;
D) JFrame frame = new JFrame() ;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions