Question 1
For each of the following, name the design pattern that the described
situation exploits.
- Adding a JScrollPane to a JTextArea object and being able
to use either as a GUI component
- Using a LayoutManager to hide the details of layout from a
container object.
- Being able to call getPreferredSize on both a JButton and
a JPanel.
- Implementing a polymorphic method by calling primitive methods.
- Being able to successively find tokens within a string without
keeping track of a string position.
- Automatically updating the view of a table when the table's data
changes.