0% found this document useful (0 votes)
24 views3 pages

Ajp Test Paper 1

The document contains instructions for a test on Java programming concepts. It includes 20 multiple choice questions about Swing components, layout managers, buttons, menus and other GUI elements.

Uploaded by

localhost54322
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views3 pages

Ajp Test Paper 1

The document contains instructions for a test on Java programming concepts. It includes 20 multiple choice questions about Swing components, layout managers, buttons, menus and other GUI elements.

Uploaded by

localhost54322
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

22517

Roll No

Dr. Panjabrao Deshmukh Girl’s Polytechnic,


Amravati
Test Paper-I

Course Name : Computer Engineering Course Code: CO5I


Semester : 5th SEM Subject Title: AJP
Marks : 20 Time: 1HR
Name: Roll No.
Name & Sign of Invigilator
_________________________________________________________________________________
Instructions:
1. All questions are compulsory.
2. Illustrate your answers with neat sketches wherever necessary.
3. Figures to the right indicate full marks.
4. Assume suitable data if necessary.
5. Preferably, write the answers in sequential order.
6. Each question carry 1 mark.

1. Which class can be used to represent the Checkbox with a textual label that can appear in a menu?
A. MenuBar B. MenuItem
C. CheckboxMenuItem D. Menu

2. JPanel and Applet use ___________________ as their default layout


A. FlowLayout B. GridLayout
C. BorderLayout D. GridBagLayout

3. _____________ pane can be used to add component to container


A. Glass B. Content
C. Container D. All of above

4. Which of the following is not a constructor of JTree


A. JTree(Object obj[]) B. JTree(TreeNodetn)
C. JTree(Vector v) D. JTree(int x)

5. Swing Components are_______________________


A. Platform dependent B. Platform Independent
C. Both a & b D. Platform oriented

6. In swing MVC architecture, c stands for:


A. Controller B. Container
C. Class D. None of this

7. The immediate super class of TextArea is…


A. TextField B. TextBox
C. TextComponent D. Component
8. Which of the following constants shows scroll bars always?
A. HORIZONTAL_SCROLLBAR_ALWAYS
B. HORIZONTAL_SCROLLBAR_AS_NEEDED
C. HORIZONTAL_SCROLLBARS
D. HORIZONTAL_ALWAYS

9. FlowLayout does not support this value of alignment…


A. FlowLayout.LEFT B. FlowLayout.CENTER
C. FlowLayout.RIGHT D. FlowLayout.BASELINE

10. What is the return type of getText( ) method of JButton class?


A. void B. String
C. Character array D. There is no such method

11. The setSize( ) method is defined by this class…


A. Applet B. Component
C. Frame D. Panel

12. Which of these methods cannot be called on JLabel object?


A. setIcon() B. getText()
C. setLabel() D. setBorderLayout()

13. A label is a simple control which is used to display_____________ on the window:


A. Text (non-editable) B. Text (editable)
C. Both A&B D. None of these

14. Multiple selections are allowed in…


A. Menu B. CheckboxGroup
C. List D. Choice

15. Which are various AWT controls from following?


A. Labels, Push buttons, Check boxes, Choice lists.
B. Text components, Threads, Strings, Servelts, Vectors
C. Labels, Strings, JSP, Netbeans, Sockets
D. Push buttons, Servelts, Notepad, JSP

16. The super class of all swing buttons is –


A. Button B. ButtonGroup
C. JButton D. AbstractButton

17. How will you assign the string and icon both to the JButton?
A. It is not possible B. Use the setTextIcon( ) method
C. Use the setIconText( ) method D. Intialize them directly in the constructor

18. JScrollPane is an immediate sub-class of –


A. JContainer B. JApplet
C. JComponent D. ScrollPane

19. The concept of the menu bar canbe implemented by using three java classes—
A. MenuBar B. Menu
C. MenuItem D. All of these

20. 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

You might also like