Saturday, May 25, 2019

Chapter 1 (MCQ:1-100)


Chapter 01
Introduction the Abstract Window Toolkit (AWT)
The AWT contains numerous classes and methods that allow us to create
and manage windows. Although the main purpose of the AWT is to support
applet windows, it can also be used to create stand-alone windows that run in a
GUI environment, such as Windows.
For detail information click me


1.JPanel and Applet use ___________________ as their default layout  =FlowLayout

2 Which are various AWT controls from following?= Labels, Push buttons, Check boxes, Choice lists.

3 Which of the following component class cannot be add on applet = Menu

4 A checkbox is a control that consists of a ____________= Combination of a small box and a Label

5A Frame's _______________ designates the area of the frame
excluding the title,menu bar and the border.= ContentPane

6 A GUI stands for _____________. = stands for Graphical User Interface

7 A JCheckBoxMenuItem is a subclass of ________. =All of these

8A label is a simple control which is used to display
_________________on the window= Text(non-editable)

9 A ScrollPane is _______________= Container

10A superclass of Textfield and TextArea classes that is used to create
single-line , multiline textfields rexpectively is_____.= Textcomponent



11A _______ is a component that appears as a group of folders in a file
cabinet.= JTabbedPane

12A __________ automatically arranges the components added to a
container.= Layout Manager

13A ____________ is a passive AWT control which do not generate any
event.= Label

14A ____________________component is a display area for a short
string of text, image or both.=Jlabel

15All Component on Container can be removed by calling following
method =removeAll()

16 All swing component classes are placed in=1 javax.swing

17 An Applet is ______________ of Panel = subclass

18Applet Container is used to prepare ________________output
window.= Both a and b

19 AppletViewer tool is available in which of the folder of = bin
Arranges the components as a deck of cards such that only one

20 component is visible at a time= CardLayout
 
21 At the top of the AWT hierarchy is the__________________ class.   =Component

22 AWT classes are contained in the __________ package   =java.awt

23 AWT is used for creating a GUI in Java. AWT stands for =Abstract Window Toolkit

24 AWTEvent Class is define in following package = java.awt

25 A________is Componenet that represents a hierarchical view of data = Jtree

26A____________ is component that presents a rectangular area in
which a component may be viewed =
  Scroll Pane


27 Border Layout is divided into_________regions=  five

28 BorderLayout class has __________regions to add components to it = Five
29 By default flowlayout uses __________justification.= Center

30By default page-up and page-down increment of scrollbar
is_____________.
= 10

31 By default the Frame has a ________________________________ =Titlebar,borders,resizing corners

32 By default which layout manager is set on applet= FlowLayout

33 By which method You can set or change the text in a Label?= setText()

34 Canvas is a ________________= Window

35 Checkable menu items are created using object of …………………….class.  CheckboxMenuItem

36 Choose the incorrect statement 1 N R 1 BorderLayout b = new BorderLayout(3,4);

37 Combobox is a combination of ________________________  TextField and Dropdown List

38 Components are added to which pane of swing JApplet . =  ContentPane

39 constructors of Jseparator are =both i and ii

40 Container is the sub class of?= Component

41 Control not support by awt are=TabbedPane,Table

42 Current text of label can be obtained using ___________________. = getText ()

43 Deafult layout manager for Frame is ___________________.= BorderLayout

44 Default layout manager for panel is = FlowLayout

45 Default layout manager for Window is = Borderlayout

46 Default Layout of Frame = BorderLayout

47 Default orientation of progress bar is: 1 N R 1 Horizontal

48Double-buffering built in, tool tips, dockable tool bars, keyboard
accelerators, custom cursors, etc. are new features of _______?
= Swing

49 Each menu is associated with a ___________list of menu items =Drop-down

50 Every layout manager is an instance of __________.he= LayoutManager interface
51 Executable applet is nothing but _________ file of= applet.class

52 FileDialog is which kind of dialog box?= Modaltype

53 FlowLayout arranges components from = Left to Right

54 FlowLayout does not support this value of alignment… =FlowLayout.BASELINE
55 Font class is available in ___________ = java.awt package

56 For adding controls to a window, we use following method = add()

57for using Swing control one must
import______________________________pacakge
= import javax.swing.*

58Frame is a standard window,which is ____________________of
Window class from AWT hierarchy
= sub class

59 getContentPane() method of which clas= JApplet

60 getSelectedCheckbox() mehod of which class= CheckboxGroup

61 How can the Checkbox class be used to create a radio button in AWT?= By associating Checkbox objects with a CheckboxGroup

62 How do you change the current layout managers for a container? = Use the setLayout() method

63 How many checkboxes we can check at a time:=multiple
64 How To Apply Image To Button ? =Using ImageIcon

65 How would you set the color of a graphics context called g to cyan? = g.setColor(Color.cyan);

66 Identify the correct constructor of Font class? = Font( String name, int fontstyle,int pointsize)

67 Identify wrong constructor of Checkbox = None of Above

68In applet, which of the following tag is used for accepting user defined
parameter?
= Param

69 In AWT Checkbox class is used to create __________ = Checkbox and Radio buttons

70 In AWT Radio buttons are created using_____________________ =CheckBoxGroup

71 In FlowLayout manager the default space between each component=5 Pixel

72In Graphics class Which method is used to set the graphics current
color to the specified color?= public abstract void setColor(Color c)

73 In how many ways we can define the scrollbar? =All of the above

74 In Swing Buttons are the subclasses of which class? = AbstractButton

75 In Swing the content pane can be obtained via method________= getContentPane()

76In Swing ____________is a component that displays rows and
columns of data. 1 N R 1 table
77 In Swing, tables are implemented by the ______________ class= JTable

78 Indentify which is a valid constructor of MenuItem class?=MenuItem(String Itemname)

79 Items are added in JComboBox using method……? = addItem()

80 JApplet class is Derived form= Applet

81Java supports input/output of data through the classes included in the
_______ package:= Java.io
82 JCheckBox is _______________________Component =  lightweight

83 JRadioButton is a subclass of ________. = AbstractButton

84 JTabbedPane class is present in which package?=javax.swing

85 Jtree class comes under which package = javax.swing

86 List can be created for multiple selection by using following constructor. = List(int num,boolean multiselect)

87 Model is the _________ of the MVC architecture. =bottom most level
88 mouse click will always generate ________________ event? = MouseEvent

89 MutableTreeNode is extends__________________interface= TreeNode

90 MVC Architecture is= Model-View-Controller

91Name the class used to represent a GUI application window, which is
optionally resizable and can have a title bar, an icon, and menus
=Frame

92 On which side applet always executed?= Client side

93 Package of drawString() method is =1 java.awt

94 Panel is defined as =All of above

95 Panel is used for __________ components= Grouping

96 Plugable Look & Feel is the feature of =Swing

97Positions the componenets into fiveregions:east,west,north,south,center=  BorderLayout

98 Program which executes applet is known as_____= Appletviewer

99 public class MenuBar extends ____________________=MenuComponent

100 Scrollbar( ) creates a ______________ scroll bar by default. = Vertical

No comments:

Post a Comment

java program (Tree)