This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes add() method for components Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "add() method for components" Watch "add() method for components" New topic
Author

add() method for components

Angela Narain
Ranch Hand

Joined: Apr 14, 2001
Posts: 327
Suppose "bt" is an instance of a class that extends Frame.
We set BorderLayout manager.
Now is it possible to a button in the following manner :
Button b = new Button("ok");
bt.add("North", b );
I donot know in which class we have this type of overloaded add method ?
g krishnan
Greenhorn

Joined: Mar 30, 2001
Posts: 23
Hi
it is the method of container,
public void add(Component comp,
Object constraints)
Object constraints refers the North, South etc, check with API
jayu jadhav
Greenhorn

Joined: Apr 13, 2001
Posts: 13
In Container class:
public Component add(string name,component)
 
Have you checked out Aspose?
 
subject: add() method for components
 
jQuery in Action, 3rd edition