Java Long Question Q2 MVC Flashcards

1
Q

Discuss three advantages of the MVC to software developers/

A

1) Ease of growth: Controller and views can grow as the model grows; and older versions of the views and controllers can still be used as long as a common interface is maintained.
2) Clarity of Design: By glancing at the models public method list, it should be easy to understand how to control the models behavior. When designing the application, this trait makes the entire program easier to implement and maintain.
3) Easier support for new types of clients: To support a new type of client, you simply write a view and controller for it and wire them into the existing Enterprise model.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Define the term pluggable look and feel.

A

Pluggable look and feel is a mechanism used in the Java Swing widget toolkit allowing to change the look and feel of the graphical user interface at runtime.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe the function of each of the following:
JOptionPane:
JScrollPane
JProgressBar

A

JOptionPane: It is used to create a JOptionPane with a test message. It is used to create an instance of JOptionPane to display a message.

JScrollPane:A JScrollPane provides a scrollable view of a component. When screen real estate is limited, use a scroll pane to display a component that is large or one whose size can change dynamically.

JProgessBar: The progress bar is a GUI control that informs the user how much (in percentage)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Discuss event handling model used in Java Swing .

Event Listener-
Event Handler-

A

Event Listener- is an object that subscribes for events from a source. Cf. the observer pattern. Usually you can have many listeners subscribing for each type of event

Event Handler- A handler is an object that is responsible for handling certain events
In other words, you usually have one handler for each type of event.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly