Does it not add the Text object?? If I am wrong please correct me and pls do specify how to add the Text object.
Joined: Oct 13, 2005
No, it creates the object, but you have to add it specifically. You use the add() calls so you can decide where to locate your object. Otherwise they might be put in the wrong position, or even on the wrong component.
Go through the API specifications, find the Window class and look through to find methods to add. (Hint ctrl-F may help .)
Do you really mean to use Window as a container rather than JFrame? Remember a Window has no border or toolbar or close button or anything.