Adding non-panel components to a panel?
Posted on 2003-03-27
I am currently trying to implement an Alarm program in which I have a panel with text boxes for the hour and minute in one panel and the clock in another panel. I've figured out how to do each of these individually yet I cannot figure out how to put the clock graphics into its own separate panel and repaint it for animation. My question is Is there a way to make a panel that can use the paint() method and also be recalled through the repaint() method?
So far I've tried containing the paint() method in its own class called MyPanel and then creating an instance of that class("MyPanel mp = new MyPanel()" and also "MyPanel mp = new Panel()") adding it to the Frame and calling repaint() on the panel. I've had no luck with either. This is really killing me. Any help is appreciated, thanks.