|
-
Flow Layout in Applet not working in child Object
As a starting point, this simple Flow Layout works:
//*****start applet code example1****
import java.awt.*;
import java.applet.*;
public class Layout extends Applet
{
Button okButton1;
public void init()
{
setLayout(new FlowLayout());
okButton1 = new Button("OneButton");
add(okButton1);
}
}
//******end applet code example 1****
But if I try to invoke create the Layout in a child, it does not work:
//******start code applet example 2****
import java.awt.*;
import java.applet.*;
public class Layout2 extends Applet
{
LayoutChild myChild;
public void init()
{
myChild = new LayoutChild();
}
}
public class LayoutChild extends Applet
{
Button okButton1;
public void init()
{
setLayout(new FlowLayout());
okButton1 = new Button("OneButton");
add(okButton1);
}
}
//******end code applet example 2****
I'm sure it is something simple. Anyone know? Thanks.
Similar Threads
-
Replies: 10
Last Post: 04-06-2005, 05:30 PM
-
Replies: 3
Last Post: 03-18-2005, 04:22 PM
-
By hhumbto in forum ASP.NET
Replies: 1
Last Post: 10-04-2002, 08:24 AM
-
By Derek Mooney in forum .NET
Replies: 94
Last Post: 10-29-2001, 08:44 PM
-
Replies: 7
Last Post: 06-26-2001, 06:29 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks