This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes Applets and the fly likes container not appearing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "container not appearing" Watch "container not appearing" New topic
Author

container not appearing

Clayton Cramer
Ranch Hand

Joined: Aug 26, 2010
Posts: 41
I've written applets before, but Bill Clinton was President, and I seem to have forgotten a lot. The applet below needs to pop up a window and ask the user to fill in a JTextArea field. The problem is that the container never appears. Help! The method textbox gets called from Javascript; my thinking was that the container should appear with a prompt, let the user fill in multiple lines of text, then return when the user hits OK or Cancel.

Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19693
    
  10

That seems like a weird way to do things to me. You're expecting the applet to resize itself, apparently, when you add those components. Maybe it can't do that.

Why don't you just do things the normal way and prepare the GUI in the init() method?
Clayton Cramer
Ranch Hand

Joined: Aug 26, 2010
Posts: 41
I need to specify a prompt and some dimensions. I don't think I can do that with init, can I?
Clayton Cramer
Ranch Hand

Joined: Aug 26, 2010
Posts: 41
Paul Clapham wrote:That seems like a weird way to do things to me. You're expecting the applet to resize itself, apparently, when you add those components. Maybe it can't do that.

Why don't you just do things the normal way and prepare the GUI in the init() method?

Now I see what is happening--I didn't have the size of the applet specified in the HTML.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: container not appearing
 
It's not a secret anymore!