1. Give the abbreviation of AWT?
A . Applet Windowing Toolkit
B . Abstract Windowing Toolkit
C . Absolute Windowing Toolkit
D . None of the above
2. Which is the container that contain title bar and can have MenuBars. It can have other components like button, textfield etc.?
A . Panel
B . Frame
C . Window
D . Container
3. Which is a component in AWT that can contain another components like buttons, textfields, labels etc.?
A . Window
B . Container
C . Panel
D . Frame
4. Which class provides many methods for graphics programming?
A . java.awt
B . java.Graphics
C . java.awt.Graphics
D . None of the above
5. _________ concept is used to create a Frame
A . encapsulation
B . inheritance
C . abstraction
D . polymorphism
6. The Following steps are required to perform 1) Implement the Listener interface and overrides its methods. 2) Register the component with the Listener.
A . Exception Handling
B . String Handling
C . Event Handling
D . None of the above
7. In which places can put the event handling code
A . Same class
B . Other class
C . Annonymous class
D . All mentioned above
8. Which package provides many event classes and Listener interfaces for event handling?
A . java.awt
B . java.awt.Graphics
C . java.awt.event
D . None of the above
9. To use the ActionListener interface it must be implemented by a class there are several ways to do that find in the following?
A . Creating a new class
B . using the class the graphical component
C . an anonymous inner class
D . All mentioned above
10. The __________________ interface is not used for handling action events?
A . ActionListener
B . KeyListener
C . MouseListener
D . ItemListener
11. Which is the container that doesn`t contain title bar and MenuBars but it can have other components like button, textfield etc?
A . Window
B . Frame
C . Panel
D . Container
12. Which method is used to set the graphics current color to the specified color in the graphics class?
A . public abstract void setFont(Font font)
B . public abstract void setColor(Color c)
C . public abstract void drawString(String str, int x, int y)
D . None of the above
13. The ActionListener interface is used for handling action events,For example,it`s used by a
A . Button
B . Checkbox
C . MenuItem
D . All of these
14. In Graphics class which method is used to draws a rectangle with the specified width and height?
A . public void drawRect(int x, int y, int width, int height)
B . public abstract void fillRect(int x, int y, int width, int height)
C . public abstract void drawLine(int x1, int y1, int x2, int y2)
D . public abstract void drawOval(int x, int y, int width, int height)
15. Which object can be constructed to show any number of choices in the visible window?
A . Labels
B . Choice
C . List
D . Checkbox
16. Which method can set or change the text in a Label?
A . setText()
B . getText()
C . Text()
D . None of the above
17. Which is a component in AWT that can contain another components like buttons, textfields, labels etc.?
A . Window
B . Container
C . Panel
D . Frame
18. Which are passive controls that do not support any interaction with the user?
A . Choice
B . List
C . Labels
D . Checkbox
19. Which package provides many event classes and Listener interfaces for event handling?
A . java.awt
B . java.awt.Graphics
C . java.awt.event
D . None of the above
20. Where can the event handling code be written?
A . Same class
B . Other class
C . Anonymous class
D . All mentioned above
21. Which is the container that doesn`t contain title bar and MenuBars but it can have other components like button, textfield etc?
A . Window
B . Frame
C . Panel
D . Container
22. The concept of the menu bar can be implemented by using three java classes—
A . MenuBar
B . Menu
C . MenuItem
D . All of these
23. In Java an event is an _______which specifies the change of state in the source.
A . Class
B . Object
C . Int
D . String
24. The classes and interfaces defined in AWT are contained within the ______ package.
A . java.awt.*
B . java.sql.*
C . java.io.*
D . java.int*
25. The general form to set a specific type of layout manager is _________
A . void setLayout(LayoutManager lm)
B . Void setLayout(LayoutManager lm)
C . void setLayout(layoutManager lm)
D . Void setLayout(Layoutmanager lm)
26. A checkbox is a control that consists of a _____________
A . Combination of a small box
B . A label
C . Combination of a large box and a label
D . Both A & B
27. An event is generated when the internal state of the event source is________
A . Not changed
B . Changed
C . Either changed or not
D . None of these
28. Positions the components into five regions:east, west, north, south, center
A . BorderLayout
B . CardLayout
C . GridLayout
D . FlowLayout
29. Arranges the components as a deck of cards such that only one component is visible at a time
A . BorderLayout
B . CardLayout
C . GridLayout
D . FlowLayout
30. Arranges the components horizontally
A . BorderLayout
B . CardLayout
C . GridLayout
D . FlowLayout
31. Arranges the componemnts into grid
A . BorderLayout
B . CardLayout
C . GridLayout
D . FlowLayout
32. __________ creates a dropdown list of textual entries
A . Choice
B . Checkbox
C . Textbox
D . TextComponent
33.How many types of events are there?
A . 5
B . 3
C . 2
D . 4
34. To manage events, Java employs the ____?
A . Custom-based Event Model
B . Retired Event Model
C . Delegation Event Model
D . None of the above
35. ____ are classes that act as a connection point between event listeners and event sources?
A . Event adapters
B . Events Handler
C . Event listener
D . Jevent
☞ Object Oriented Programming through Java MCQs - Unit-1 - [ OOP_JAVA ]
☞ Object Oriented Programming through Java MCQs - Unit-2 - [ OOP_JAVA ]
☞ Object Oriented Programming through Java MCQs - Unit-3 - [ OOP_JAVA ]
☞ Object Oriented Programming through Java MCQs - Unit-4 - [ OOP_JAVA ]
☞ Object Oriented Programming through Java MCQs - Unit-5 - [ OOP_JAVA ]
☞ R - Programming MCQs - Unit-1 - [ R-Programming ]
☞ R - Programming MCQs - Unit-2 - [ R-Programming ]
☞ R - Programming MCQs - Unit-3 - [ R-Programming ]
☞ R - Programming MCQs - Unit-4 - [ R-Programming ]
☞ R - Programming MCQs - Unit-5 - [ R-Programming ]
☞ Formal Languages and Automata Theory (FLAT) MCQs - Unit-1 - [ FLAT ]
☞ Formal Languages and Automata Theory (FLAT) MCQs - Unit-2 - [ FLAT ]
☞ Formal Languages and Automata Theory (FLAT) MCQs - Unit-3 - [ FLAT ]
☞ Formal Languages and Automata Theory (FLAT) MCQs - Unit-4 - [ FLAT ]
☞ Formal Languages and Automata Theory (FLAT) MCQs - Unit-5 - [ FLAT ]
☞ PPS MCQs - Unit-1 - [ PPS ]
☞ PPS MCQs - Unit-2 - [ PPS ]
☞ PPS MCQs - Unit-3 - [ PPS ]
☞ PPS MCQs - Unit-4 - [ PPS ]
☞ PPS MCQs - Unit-5 - [ PPS ]
☞ Design and Analysis of Algorithms MCQs - Unit-1 - [ DAA ]
☞ Design and Analysis of Algorithms MCQs - Unit-2 - [ DAA ]
☞ Design and Analysis of Algorithms MCQs - Unit-3 - [ DAA ]
☞ Design and Analysis of Algorithms MCQs - Unit-4 - [ DAA ]
☞ Design and Analysis of Algorithms MCQs - Unit-5 - [ DAA ]
☞ Software Engineering MCQs - Unit-1 - [ SE ]
☞ Software Engineering MCQs - Unit-2 - [ SE ]
☞ Software Engineering MCQs - Unit-3 - [ SE ]
☞ Software Engineering MCQs - Unit-4 - [ SE ]
☞ Software Engineering MCQs - Unit-5 - [ SE ]
☞ Data Mining MCQs - Unit-1 - [ DM ]
☞ Data Mining MCQs - Unit-2 - [ DM ]
☞ Data Mining MCQs - Unit-3 - [ DM ]
☞ Data Mining MCQs - Unit-4 - [ DM ]
☞ Data Mining MCQs - Unit-5 - [ DM ]
☞ Computer Organization and Architecture (COA) Objective Question Bank-Unit-1 - [ COA ]
☞ Computer Organization and Architecture (COA) Objective Question Bank-Unit-2 - [ COA ]
☞ Computer Organization and Architecture (COA) Objective Question Bank-Unit-3 - [ COA ]
☞ Computer Organization and Architecture (COA) Objective Question Bank-Unit-4 - [ COA ]
☞ Computer Organization and Architecture (COA) Objective Question Bank-Unit-5 - [ COA ]
☞ Data Structures Objective Type Question Bank-Unit-1 - [ DS ]
☞ Data Structures Objective Type Question Bank-Unit-2 - [ DS ]
☞ Data Structures Objective Type Question Bank-Unit-3 - [ DS ]
☞ Data Structures Objective Type Question Bank-Unit-4 - [ DS ]
☞ Data Structures Objective Type Question Bank-Unit-5 - [ DS ]
☞ Database Management System Objective Type Question Bank-Unit-1 - [ DBMS ]
☞ Database Management System Objective Type Question Bank-Unit-2 - [ DBMS ]
☞ Database Management System Objective Type Question Bank-Unit-3 - [ DBMS ]
☞ Database Management System Objective Type Question Bank-Unit-4 - [ DBMS ]
☞ Database Management System Objective Type Question Bank-Unit-5 - [ DBMS ]
☞ Cyber Forensics Objective Type Question Bank-Part-2 - [ Cyber Forensics ]
☞ Cyber Forensics Objective Type Question Bank-Part-1 - [ Cyber Forensics ]
☞ Java Programming Objective Type Question Bank - [ Java Programming ]
☞ Java Programming Objective Type Questions-Part-1 - [ Java Programming ]
☞ Java Programming Objective Type Questions-Part-2 - [ Java Programming ]