Java AWT And Swing Mcqs
Q.1: AWT more powerful components like tables, lists, scroll panes, color chooser, tabbed pane etc.?_
A. False
B. True
C. No Option
D. No Option
Q.2: Which is used to store data and partial results, as well as to perform dynamic linking, return values for methods, and dispatch exceptions?
A. Container
B. Window
C. Frame
D. Panel
Q.3: Which is a component in AWT that can contain another components like buttons, textfields, labels etc.?f
A. Window
B. Container
C. Panel
D. Frame
Q.4: These four methods commonly used in?1)public void add(Component c)2)public void setSize(int width,int height)3)public void setLayout(LayoutManager m)4)public void setVisible(boolean)
A. Graphics class
B. Graphics class And Component class"
C. Component class
D. None
Q.5: In which places can put the event handling code:0
A. Other class
B. All
C. Annonymous class
D. Same class
Q.6: By which method You can set or change the text in a Label?:
A. None
B. SetText()
C. GetText() And setText()
D. GetText()
Q.7: Which class is used for this Processing Method processActionEvent( )?E
A. None
B. Scrollbar,Component,Button
C. Button,List,MenuItem
D. Button,Checkbox,Choice
Q.8: In Graphics class Which method is used to set the graphics current color to the specified color?`
A. Public abstract void setFont(Font font)'
B. Public abstract void drawString(String str, int x, int y)9
C. Public abstract void setColor(Color c)&
D. None
Q.9: The following way is used to create a frame is by creating the object of Frame class?U
A. Inheritance
B. Association
C. Inheritance And association
D. None
Q.10: In Graphics class which method is used to draws a rectangle with the specified width and height?`
A. Public abstract void drawOval(int x, int y, int width, int height)B
B. Public abstract void drawLine(int x1, int y1, int x2, int y2)=
C. Public void drawRect(int x, int y, int width, int height)9
D. Public abstract void fillRect(int x, int y, int width, int height)B

Related Mcqs

All Subject Mcqs