File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

container not appearing

 
Clayton Cramer
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20171
25
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic