I am trying to write a slide show program in Java and would like to make the implementation as simple as possible.
The goal is to show a series of slides, each of which has navigation buttons, in addition to other buttons that depend on the slide's content. (A slide showing text would have a magnifyTextButton
and a slide with an image would not have this button.)
I was thinking an abstract Slide
class would be appropriate, with subclasses for each slide type: TextSlide
and ImageSlide
. How would I implement these subclasses so that the magnifyTextButton
would show up in TextSlide
s , and not in any other slide?
Also, my Slide
class extends JFrame
. Would each instance of a subclass of Slide
need to construct a JFrame object if the show is designed to take place in a single window, like in PowerPoint?