Sheet1 Stud

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Sr Question Answer 1 Answer 2 Answer 3 Answer 4

.
1 Which of the following are Labels, Push Text components, Labels, Strings, Push buttons,
various AWT controls? buttons, Check Threads, Strings, JSP, Netbeans, Servelts, Notepad,
boxes, Choice Servelts, Vectors Sockets JSP
lists.
2 What is the Difference Between In Gridlayout In Gridlayout grid The size of each All of the above
Grid And Gridbaglayout? size of grid is size is constant & component in
varied & in GridbagLayout both layout is
GridbagLayout grid size can be same
grid size is same varied
3 What Is A Layout Manager? A layoutmanager It is a container It is a component All of the above
is object that is object. object.
used to organize
components in
container

4 Which of these classes RowLayout ColumnLayout GridBagLayout All of the above


implement the LayoutManager
interface?
5 The default alignment of LEFT CENTER RIGHT JUSTIFY
buttons in Flow Layout is
..........
6 The default horizontal and 0 Pixel 1 Pixel 5 Pixel 10 Pixel
vertical gap in FlowLayout is
7 The default horizontal and 0 Pixel 1 Pixel 5 Pixels 10 Pixels
vertical gap in BorderLayout is

8 Panel is container and is not a True False


window in itself.
9 A layout manager is basically components in a Objects in a components in a Objects in a panel
an object, Its mainly used to container container window
organize
10 Which method is used to void set(int x,int void setBounds(int void void setBounds(int
change size and position of y,int width,int width,int height,int setbounds(int x,int y,int width,int
Components? height) x) x,int y,int height)
width,int height)
11 Which of the GridBagLayout gridwidth, gridx, gridy ipadx, ipady insets
variable defines the external gridheight
padding around the component
12 Which of the GridBagLayout gridwidth, gridx, gridy ipadx, ipady insets
variables defines padding that gridheight
gets added to each side of
component
13 Constructs a new Scrollbar() Scrollbar(int ) Scrollbar(int , int , All of above
scroll bar with the specified int , int , int)
orientation.
14 Which is the correct constructor GridLayout(int GridLayout(int GridLayout(int GridLayout(int
of GridLayout numrows) numrows, int numrows, int numrows, int
numcols,intx) numcols,intx,inty) numcols)

15 Panel is a concrete subclass of Window Container. Panel Frame


.
16 How to change the current ChangeLayout() isLayout() method setLayout() getLayout()
layout managers for a method method method
container?
17 What is use of 5th parameter in orientation visible maximum minimum
given constructor
Scrollbar(int,int,int,int,int)
18 In given constructor what 3rd orientation visible thumbsize none of these
parameter indicates Scrollbar
s=new
Scrollbar(0,10,20,0,1000)
19 What is purpose of default To create To create Both all of above
constructor of Scrollbar( ) vertical horizontal
class? Scrollbar Scrollbar
20 Which of the following sets the frm.setSize( 300, frm.setSize( 200, frm.paint( 300, frm.setVisible(
frame to 300 pixels wide by 200 ); 300 ); 200 ); 300, 200 );
200 high?
21 What is a container object in A container is A container is any A container is A container is
GUI programming? another name for class that is made primitive variable object like Frame
array or vector up of other classes that contains the that has other
actual data components placed
inside it
22 Which of the following is the GUI toolkit Abstract Graphics Event Java Enhancement
Java toolkit used to write GUI Windowing Toolkit Toolkit
programs? Toolkit
23 When is the paint() method of a The user calls it The main() method The Java system The Java system
frame object called? to display the calls it once when calls it every time calls it once when
frame. the program starts. it decides to the program starts.
display the frame.
24 Which of the following Display Manager Component Stage Manager Layout Manager
determines how the components Manager
of a container are displayed?

25 Which method of a Frame is setLayout() add() actionPerformed() setVisible()


used to set the layout manager?

26 Echoing of characters can be echoChar() isEchochar() setEchochar() echoCharIsSet()


disabled as they are typed by

27 -------------------- class is used java.io.FlowLay java.awt.FlowLayo javax.awt.GridLa javax.awt.CardLay


to apply flow layout. out ut yout out
28 Which of the following public void public void public void All of the above
methods are used to navigate next(Container previous(Container first(Container
through the different cards in parent) parent) parent)
card layout?
29 Which of the following method public void public void public void public void
is used to show the specific show(Container show(Container first(Container next(Container
card? parent, String parent) parent, String parent, String
name) name) name)
30 We can control the alignment FlowLayout.RIG FlowLayout.LEFT FlowLayout.CEN All of the above
of components in a flowlayout HT TER
arrangement, by using

31 insert() is the method of TextArea TextField Button None of above


class.
32 Which of the following setHgap (int) int setVgap (int), void setHgap None of the above
methods are used to set the int setHgap (int) (int),void setVgap
Hgap and Vgap in flow layout? (int)

33 ----------------method is used to setAlignment getAlignment () setAlignment () getAlignment (int)


set the alignment in flow (int)
layout.
34 The constructors in BorderLayout() BorderLayout(int Both a and b None of the above
BorderLayout class are----------- hgap, int vgap)
-
35 The constructors in GridLayout GridLayout() GridLayout(int
GridLayout(int All of the above
class are----------- rows, int cols)
rows, int cols, int
hgap, int vgap)
36 The method is used to int getColumns() void getColumns() void None of the above
know number of columns in the getColumns(int)
grid layout.
37 The FileDialog(Dialo FileDialog(Dialog FileDialog(Frame None of the above
constructor is used to create g parent) parent, String title) parent)
FileDialog with specified title.
38 The method is used public void public void public void All of the above
to move to the first card in card previous(Contai first(Container next(Container
layout. ner parent) parent) parent)
39 The method is void setMode(int int setMode(int void setMode() int setMode()
used to set the mode of the mode) mode)
FileDialog.
40 class implements a single Button TextField Checkbox TextArea
line text-entry area.
41 Which of the following method setBackground( setForeground( add() getBackground()
of a Frame is used to change it's Color c ) Color c )
color?
42 Which of the following method setBackground( setForeground( add() getBackground()
of a Frame is used to change it's Color c ) Color c )
color?
43 Which constructor is used to set GridLayout() GridLayout(int rw, GridLayout(int All of the above
the grid layout with vertical gap int cl) rw, int cl, int
and horizontal gap? hgap, vgap)

44 To create menus on the Menu MenuBar MenuItem All of the above


container which of the
following classes are used?
45 ---------------------method is add() addComponent(); addMenuItem() setItem()
used to add the menu items to
menus.
46 ----------------------method is setMenu() setMenuBar() addMenuBar() All of the above
used to add the menubar to the
frame.
47 Which of the given component A and B B and C C and D A and D
allow multiple selections
A.Checkbox B.Radiobutton
C.Choice D.List

48 is immediate super class MenuBar MenuItem MenuComponent Object


of Menu class.
49 Which of the following creates new List(5,true) new List(true,5) new List(5,false) new List(false,5)
a List with 5 visible items and
multiple selection enabled?
50 Which of the following may a A and B B and C A and D A and C
menu contain? A) separator B)
check box C) menu item D)
panel
51 How could you set the frame s.setBackground s.setColor(PINK); s.Background(pin s.color=Color.pink
surface color to pink ? (Color.pink); k);
52 which of the following method getState() getLabel() setState() setLabel()
is used to retrieve whether
checkbox is selected?

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy