This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes where is the frame and its components Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "where is the frame and its components" Watch "where is the frame and its components" New topic
Author

where is the frame and its components

bharani rao
Ranch Hand

Joined: Apr 06, 2009
Posts: 164
hi,

i have the following code which has 3 Jlabels, 3 jtextfield and one jbutton.
but when i run thre are no components present.






when i click and drag it ( resizing manually,) all the componets are there.

what should i do to solve this problem


thanks in advance

when i run it is showing some minute thing on the left top corner.
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1473
    
    6

JDialogTest frame = new JDialogTest();

The above line will invoke the default constructor of the class. But your entire initialization code is inside the method named init(). So either you need to define the constructor and put the initialization code there or you need to call the init method.

frame.init();


Swastik
bharani rao
Ranch Hand

Joined: Apr 06, 2009
Posts: 164
hi swastik,

i tried but it did not work... same problem.



thank you in advance
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1473
    
    6

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
There seems to be nothing applet-specific about the question; moving to the Swing forum.


Ping & DNS - my free Android networking tools app
bharani rao
Ranch Hand

Joined: Apr 06, 2009
Posts: 164
thank you swastik,,

it is working..


thank you
 
 
subject: where is the frame and its components