aspose file tools
The moose likes Applets and the fly likes container not appearing Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "container not appearing" Watch "container not appearing" New topic
Author

container not appearing

Clayton Cramer
Ranch Hand

Joined: Aug 26, 2010
Posts: 40
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
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

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: 40
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: 40
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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: container not appearing
 
Similar Threads
does a JTextArea need some event listener?
method calls
finalize an applet
Applet focus problem, I think
determining minimum dimensions of an Applet