The Artima Developer Community
Sponsored Link

Java Answers Forum
japplet vs jframe

1 reply on 1 page. Most recent reply: Feb 12, 2004 12:47 PM by twc

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
bernadette

Posts: 5
Nickname: sash6
Registered: Feb, 2004

japplet vs jframe Posted: Feb 12, 2004 7:16 AM
Reply to this message Reply
Advertisement
When is it appropriate to use JFrame and when is it appropriate to use JApplet? I'm trying to understand the differences between these.


twc

Posts: 129
Nickname: twc
Registered: Feb, 2004

Re: japplet vs jframe Posted: Feb 12, 2004 12:47 PM
Reply to this message Reply
You would only use JApplet when you want to create an applet which would be embedded in a webpage to be run in a browser. While you *can* use JFrame's in applets, it is uncommon. Usually, JFrame's are used when creating stand-alone applications.

Of course, most applets use the Applet class instead of JApplet due to compatibility issues with Internet Explorer, but that is a separate issue.

Also, even if you use JFrame in an applet, you still have to use either Applet or JApplet. The browser is designed to instantiate an Applet or JApplet object, not a JFrame.

I hope this helps.

Flat View: This topic has 1 reply on 1 page
Topic: Network listing using JAVA Previous Topic   Next Topic Topic: Search File

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use