Computer Knowledge

GUI and Web Frameworks

1,711 Questions

Graphical user interface and web frameworks involve layout management, directives, and application design across platforms like Android and Angular. These concepts are tested in computer science and IT officer competitive exams. Review these questions to understand UI components and coding standards.

Android layout attributesAngular structural directivesVB.Net web methodsJava Swing componentsSiebel application framework

GUI and Web Frameworks Questions

Multiple choice
  1. removeLayoutComponent(Component c)

  2. removeComponent(Component c)

  3. maxLayoutSize(Container c)

  4. preferredSize(Container c)

  5. addLayoutComponent(Component c, Object constraints)

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

This is the correct choice. removeLayoutComponent(Component c) method is present in the CardLayout class in Java. 

Multiple choice
  1. getMaximumSpanAxis(int axis)

  2. getMaxSpanAxis(int axis)

  3. getMaximumSpan(int axis)

  4. getMaxSpanAxis(int axis)

  5. None of these

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

This is the correct choice. getMaximumSpan(int axis) method is present in the BlockView class and it determines the maximum span for a view along an axis, which is specified as an argument to it.

Multiple choice
  1. It is an abstract superclass of AWT components.

  2. It is a subclass of Component class and is used to hold the other components.

  3. It is a top level window with a title and a border.

  4. It is a top level window with a title and a border and is used to take input from the user.

  5. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Yes, this is called the Container class in AWT hierarchy.

Multiple choice
  1. bin

  2. lib

  3. source

  4. class

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The AppletViewer tool, like other JDK utilities such as javac and java, is located in the bin directory of the JDK installation. The bin folder contains executable programs and tools, while lib contains libraries and class files.

Multiple choice
  1. getWidthHeight()

  2. setWidthHeight()

  3. getSize()

  4. setHeightWidth()

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The getSize() method returns a Dimension object containing both the width and height of an applet or component. There is no standard getWidthHeight() or setWidthHeight() method in the Java AWT framework - you use getSize() to retrieve dimensions and setSize() to set them.

Multiple choice
  1. AppletContext, AppletConfig

  2. AppletContext, AppletStub, AudioClip

  3. AppletConfig, AppletStub, AudioClip

  4. AppletConfit,AppletStub, VideoClip

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The standard interfaces associated with Applet applications in the legacy java.applet package include AppletContext, AppletStub, and AudioClip. These provide communication capabilities, audio playing, and applet environment management.

Multiple choice
  1. Container class

  2. Component class

  3. Frame class

  4. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In Java AWT, Window, Panel, and ScrollPane all extend Container directly. Container is an abstract class that extends Component and adds the ability to hold child components.

Multiple choice
  1. setBackground(Color.pink);

  2. setColor(PINK);

  3. Background(pink);

  4. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The setBackground(Color) method, inherited from Component, sets the background color of any component including Frame. Color.pink is the correct way to specify pink color in Java AWT.