AJP Unit-1
70 Questions
17 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

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

  • Text(non-editable) (correct)
  • Text(editable)
  • Both a & b
  • None of these
  • Which type of container do not have any type of menubar?

  • Frame
  • Panel (correct)
  • Applet
  • None of this
  • MVC means Model View ___________

  • Container
  • Class
  • Controller (correct)
  • Cast
  • The interface is used to handle the menu events

    <p>ActionListener (C)</p> Signup and view all the answers

    The ActionListener interface is not used for handling action events?

    <p>False (B)</p> Signup and view all the answers

    Which class is used for this processing method processActionEvent()?

    <p>Button,List,MenuItem (A)</p> Signup and view all the answers

    Which event is generated when the position of scrollbar is changed?

    <p>AdjustmentEvent (D)</p> Signup and view all the answers

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

    <p>ContentPane (B)</p> Signup and view all the answers

    At the top of the AWT hierarchy is the__________________ class.

    <p>Component (A)</p> Signup and view all the answers

    By default the Frame has a _______________________________

    <p>Titlebar,borders,resizing corners (D)</p> Signup and view all the answers

    By which method You can set or change the text in a Label?

    <p>setText() (B)</p> Signup and view all the answers

    BorderLayout b = new BorderLayout(3,4); The above statement is incorrect

    <p>True (A)</p> Signup and view all the answers

    By default flowlayout uses __________justification.

    <p>Center (C)</p> Signup and view all the answers

    Border Layout is divided into_________regions.

    <p>Five (A)</p> Signup and view all the answers

    Combobox is a combination of ________________________

    <p>TextField and Dropdown List (C)</p> Signup and view all the answers

    Default layout manager for Window is

    <p>Borderlayout (A)</p> Signup and view all the answers

    How To Apply Image To Button ?

    <p>using ImageIcon (B)</p> Signup and view all the answers

    In AWT Checkbox class is used to create __________

    <p>Checkbox and Radio buttons (D)</p> Signup and view all the answers

    How would you set the color of a graphics context called g to cyan?

    <p>g.setColor(Color.cyan); (A)</p> Signup and view all the answers

    AWT is heavy weight component

    <p>True (A)</p> Signup and view all the answers

    setMenuBar() method of which class?

    <p>MenuBar (B)</p> Signup and view all the answers

    In given constructor what 3rd parameter indictaes Scrollbar s=new Scrollbar(0,10,20,0,1000)

    <p>Size of thumb (C)</p> Signup and view all the answers

    In order to obtain currunt value of scrollbar at run time which method you will use

    <p>getValue() (D)</p> Signup and view all the answers

    What is point?

    <p>It Encapsulates a Cartesian coordinate pair, stored in x and y (A)</p> Signup and view all the answers

    what will be the output

    <p>Error (A)</p> Signup and view all the answers

    Which of the following are the methods of checkbox

    <p>Both a and b (D)</p> Signup and view all the answers

    What is API

    <p>Application Programming Interface (C)</p> Signup and view all the answers

    _____________ method returns currently selected item in choice.

    <p>getSelectedItem() (A)</p> Signup and view all the answers

    Which of the method can be used to output a String in an Applet?

    <p>drawString() (C)</p> Signup and view all the answers

    What are the types of DialogBox?

    <p>Modal and Modeless DialogBox (B)</p> Signup and view all the answers

    The following way is used to create a frame is by creating the object of Frame class?

    <p>association (B)</p> Signup and view all the answers

    Panel class is a concrete sub-class of container.

    <p>True (A)</p> Signup and view all the answers

    When there is a switching condition like ON or OFF, which control is used of following?

    <p>ToggleButton (C)</p> Signup and view all the answers

    All Component on Container can be removed by calling following method

    <p>removeAll() (A)</p> Signup and view all the answers

    Canvas is a ________________

    <p>Window (C)</p> Signup and view all the answers

    Which is the container that contain title bar and can have MenuBars.It can have other components likenbutton,textfield etc.?

    <p>Frame (C)</p> Signup and view all the answers

    Which class provides many methods for graphics programming?

    <p>java.awt.Graphics (C)</p> Signup and view all the answers

    The getContentPane() method is of which clasS?

    <p>None of these (D)</p> Signup and view all the answers

    Frame is a standard window, which is _______________ of window class from AWT hierarchy?

    <p>Derived class / Subclass (A)</p> Signup and view all the answers

    Which of these classes can be added to any Container class, using the add method defined in Container class?

    <p>Button (A)</p> Signup and view all the answers

    The method _________________ places a Menu m into the MenuBar mb.

    <p>mb.add(m) (C)</p> Signup and view all the answers

    ________________ is a swing class that allows to enter a singleline of text.

    <p>JTextField (B)</p> Signup and view all the answers

    The correct hierarchy for Panel is___________________

    <p>Component-Container-Panel (C)</p> Signup and view all the answers

    Controls not supported by awt are

    <p>TabbedPane,Table (A)</p> Signup and view all the answers

    Executable applet is nothing but _________ file of applet

    <p>.class (B)</p> Signup and view all the answers

    In FlowLayout manager the default space between each component is

    <p>5 Pixel (D)</p> Signup and view all the answers

    Scrollbar( ) creates a ______________ scroll bar by default.

    <p>Vertical (B)</p> Signup and view all the answers

    Text field usually called as

    <p>edit Control (C)</p> Signup and view all the answers

    The method setLabel can be used with what type of Object ?

    <p>TextField (A)</p> Signup and view all the answers

    To retrieve the current state of a check box,call


    <p>getState() (B)</p> Signup and view all the answers

    Which Among the below is not an AWT class.

    <p>RadioButton (D)</p> Signup and view all the answers

    Which of the following are the methods of choice

    <p>All of these (D)</p> Signup and view all the answers

    Which of the following is the correct method of scrollbar

    <p>int getOrientation() (A)</p> Signup and view all the answers

    Which class can be used to represent a checkbox with a textual label that can appear in a menu. Select the one correct answer.

    <p>CheckboxMenuItem (A)</p> Signup and view all the answers

    What will be the output of line 5

    <p>3 (C)</p> Signup and view all the answers

    Which components are reuired to get following output

    <p>List and Button (B)</p> Signup and view all the answers

    Select one option

    <p>Label,TextField (D)</p> Signup and view all the answers

    Which is the correct constructor of GridLayout

    <p>GridLayout(int numrows, int numcols) (B)</p> Signup and view all the answers

    init() method exectues only once.

    <p>True (A)</p> Signup and view all the answers

    Which of the following controls does not support interaction with user?

    <p>Label (A)</p> Signup and view all the answers

    Select any one

    <p>Component class (B)</p> Signup and view all the answers

    Select any one

    <p>10 point Times New Roman (C)</p> Signup and view all the answers

    Which components are used in the following output

    <p>Button, TextField, Checkbox, Choice, TextArea (A)</p> Signup and view all the answers

    Choose the correct sequence for the following output

    <p>TextField, TextArea, Checkbox1, Checkbox2 (B)</p> Signup and view all the answers

    Components in the frame is added at appropriate place using

    <p>setBounds(int,int,int,int) (B)</p> Signup and view all the answers

    Multiple layouts in the single conainer can be created with the help of


    <p>Panel (D)</p> Signup and view all the answers

    Say that a Frame contains three Panels. Could each Panel have a different layout manager?

    <p>Yes---each one can use setLayout() with any layout manager (A)</p> Signup and view all the answers

    Which statement with respect to inner class is true.

    <p>All Statements A,B,C are true (D)</p> Signup and view all the answers

    The set Background() method is part of which of the following class java.awt package

    <p>Component (A)</p> Signup and view all the answers

    How many types of controls does AWT supports these controls are Subclasses of component?

    <p>7 (A)</p> Signup and view all the answers

    More Like This

    Use Quizgecko on...
    Browser
    Browser