CSSE 221: Fundamentals of Software Development Honors
Programming assignment (due by Monday 11:59 pm)
Finish Fifteen, as stated in the specification, being sure you have checked in your final,
fully-documented copy to the repository.
Written homework to do before week 4 (due before beginning of class on Monday, Sept
24).
Answers are to be written in your own words!
As usual, please bring hardcopy for written answers to class to hand in on Monday.
- Weekly reading. You may also want to refer to the
Sun Java tutorial on Swing as a reference.
- (15 pts) Describe any three different LayoutManagers in Swing.
- (10 pts) Describe any advantages of having a panel be a subclass of JPanel rather than using JPanel as-is.
- (6 pts) When is it appropriate to use the ActionListener interface? What method must you implement when using it?
- (4 pts) Look at the API for MouseListener, MouseMotionListener, KeyListener, and ChangeListener. Name one method from each interface.
- (15 pts) Write a class called MyButton extending JButton. When a button of this type is pressed, it turns another panel,
myPanel (stored as a field), the color green.
- (5 pts) What is the difference between JTextField and JTextArea?
- (15 pts) Say you wanted to create a two-dimensional dynamically sized 2D array (i.e. a 2D ArrayList). Write a short paragraph speculating how you might tackle this problem.
Reminder that assistants are in Moench F217 every weekday afternoon and from 7-9pm on Sunday through Thursday nights to help you.