Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please Help me with Applet

 
Rodrigo Cruz
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I insert a Panel in my Applet??? I know just one method that is add(), but it doesn�t work out of init() and i need to call this Panel out of init method. Someone in the world know how i can do it???
 
Matthew Orral
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can do this with getContentPane().add(new JPanel(...))
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Matthew's advice is correct for JApplet, which is a Swing-based version of Applet that works only in the Java plug-in.
If you're talking about plain Applets, then why not show us the code that you tried, and be a bit more specific than "it doesn't work" (because "it" should indeed work fine) and maybe we can help.
 
Matthew Orral
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, i was thinking of my own swing applet .With awt this.add(Component) must work.
P.D :Swing (JApplet,etc...) works well also without java plugin.
What about swt (Eclipse)? i've read it's the most efficient ui toolkit with still some portability problems...
[ July 30, 2003: Message edited by: Matthew Orral ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic