This may seem a silly question.....but I need help . Is it possible to paint(i.e- draw graphics) on a frame. All the examples I have come across, override the paint method in applets. It should be posible, because the paint method has been defined in the Component class, and the Frame class extends Window which extends Container which extends Component.....so it should be possible.....right!!! But then, how do you invoke the method??? Could someone please help me out. Any help would be a great help....Thank you Rebecca
You actually don't need to invoke the paint method. When the frame is set visible it will automatically fire a paint event, which will run your overridden paint routine. However, if you REALLY want to call the paint method you can only invoke the paint method by calling repaint(). The repaint method takes no arguments (you don't need to figure out how to get Graphics object). It actually fires a paint event which calls your overridden paint routine. Manfred.