File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes CodeBarn - How does Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "CodeBarn - How does "Shapes" work?" Watch "CodeBarn - How does "Shapes" work?" New topic
Author

CodeBarn - How does "Shapes" work?

mike vessey
Greenhorn

Joined: Nov 09, 2002
Posts: 2
In the Shapes example code (http://www.javaranch.com/CodeBarn/shapes.jsp) how does the paint method get called?
The main method instantiates a new ShowShapes object, which seems to have a constructor method that just sets up a window and makes it visible. From where is the paint method called?
Thanks
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
The statement

setVisible( true );

causes paint() to be called.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CodeBarn - How does "Shapes" work?
 
Similar Threads
SortNames woes...
JavaRanch CodeBarn now has Servlet and JSP examples
JavaRanch CodeBarn now has Servlet and JSP examples
Interfaces
class casting