-
-
Consider the following tags and attributes of tags: CODEBASE ALT NAME CLASS JAVAC HORIZONTALSPACE VERTICALSPACE WIDTH PARAM JARWhich of the above can be used within the and tags?
A) line 1, 2, 3B) line 8, 9C) line 3, 4, 5D) line 8, 9, 10
-
Which containers use border layout as their default layout ? (Select Multiple)
A) PanelB) DialogC) FrameD) Window
-
The types of popups in swing are 1. Lightweight Popup2. Heavyweight popup3. Medium weight popup
A) 1, 2B) 2, 3C) 1, 3D) 1, 2, 3
-
The three most common z-order related problems have to do with Swings following componants. (Select Multiple)
A) JScrollPane.B) JInternalFrameC) JInternalFrame popup componants.D) JPanel.
-
What is the result of executing the following Java class: import java.awt.*; public class FrameTest extends Frame {public FrameTest() {add (new Button("First"));add (new Button("Second"));add (new Button("Third"));pack();setVisible(true);}public static void main(String args []) {new FrameTest();}} Select from the following options:
A) Only the "third" button is displayed.B) A runtime exception is generated (no layout manager specified).C) Only the "first" button is displayed.D) Only the "second" button is displayed.
-
What does the following code draw?g.setColor(Color.black);g.drawLine(10, 10, 10, 50);g.setColor(Color.RED);g.drawRect(100, 100, 150, 150);
A) A red vertical line that is 40 pixels long and a red square with sides of 150 pixelsB) A black vertical line that is 40 pixels long and a red square with sides of 150 pixelsC) A black vertical line that is 50 pixels long and a red square with sides of 150 pixelsD) A red vertical line that is 50 pixels long and a red square with sides of 150 pixelsE) A black vertical line that is 40 pixels long and...
-
Fill in the blanks :- The meaning of ‘x’ in javax.swing is _______________
A) Extension of java
-
Which of the following are methods of the Graphics class? (Select Multiple)
A) drawRect( )B) drawImage( )C) drawPoint( )D) drawString( )
-
Using a FlowLayout Manager, which of the following is the correct way to add elements to a container. (Select Multiple)
A) add(component);B) set(component);C) add(x,y, component);D) add(“Center”,component);
-
State true or false :-Images can be displayed in swings
A) TrueB) False
-
Which of the following options are correct regarding the organization of layouts (Select Multiple)
A) FlowLayout : The elements of a FlowLayout are organized in a top to bottom, left to right fashion.B) BorderLayout : The elements of a BorderLayout are organized at the borders (North, South, East and West) and the center of a container.C) CardLayout : The elements of a CardLayout are stacked, one on top of the other, like a deck of cards.D) GridBagLayout : The elements of a GridLayout are of equal...
-
What are invisible componants in swings ? (Select Multiple)
A) Componants which take space in the GUI on the client interface.B) Componants which cannot perform painting operation.C) Componants which can perform painting operation.D) The componants that are visible but no componants can be added in it.
-
What are the restrictions imposed by the security manager on applets. (Select Multiple)
A) Cannot start any program on the host that is executing it.B) Cannot read some system properties.C) Cannot load libraries or define native methods.D) Cannot read or write files on the host that is executing it.
-
-
Which Font attributes are available through the FontMetrics class? (Select Multiple)
A) ascentB) leadingC) caseD) height
-
Which of the following (is)are true?
A) A Dialog can have a MenuBar.B) MenuItem extends Menu.C) A MenuItem can be added to a Menu.D) A Menu can be added to a Menu.
-
-
Which of the following are true?
A) The event-inheritance model has replaced the event-delegation model.B) The event-inheritance model is more efficient than the event-delegation model.C) The event-delegation model uses event listeners to define the methods of event-handling classes.D) The event-delegation model uses the handleEvent( ) method to support event handling.
-
Java Swing Interview Qustions
Ans