*
The moose likes Applets and the fly likes Please Help me with Applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Please Help me with Applet" Watch "Please Help me with Applet" New topic
Author

Please Help me with Applet

Rodrigo Cruz
Greenhorn

Joined: Jul 29, 2003
Posts: 1
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

Joined: Jul 27, 2003
Posts: 11
you can do this with getContentPane().add(new JPanel(...))
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

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.


[Jess in Action][AskingGoodQuestions]
Matthew Orral
Greenhorn

Joined: Jul 27, 2003
Posts: 11
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 ]
 
 
subject: Please Help me with Applet
 
Similar Threads
Create New Image Using 1.1
HELP......................
placing an image into a panel
BEGINNER-URGENT
Please help with scope of panels...