File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Components not showing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Components not showing" Watch "Components not showing" New topic

Components not showing

Andrew Wisner

Joined: Aug 07, 2012
Posts: 4
I'm new at writing applets. Today, I attempted to write an applet with the code below (the only code so far) in the init() method. When I run the code, I get a blank applet. I know I must be making some stupid mistake, but I can't figure out what it is. Any help is much appreciated!

Andrew Wisner
Paul Clapham

Joined: Oct 14, 2005
Posts: 19891

I don't understand line 2. Is the comment at line 1 supposed to describe that? Because line 1 suggests you're going to be dealing with the applet's content pane, but line 2 creates a new Container instead.
Andrew Wisner

Joined: Aug 07, 2012
Posts: 4
I thought that "pane" is another word for the "container" object. Is it not?
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
looks like you're missing this last line
I agree. Here's the link:
subject: Components not showing
jQuery in Action, 3rd edition