Jump to content
  • Advertisement
Sign in to follow this  
ju2wheels

Java: applications and applets

This topic is 4756 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi im still in the process of learning Java and had a question about a design thought I had for modifying a future application. Is it possible to add Swing components such as a scrolling pane from an application to an applet(if it were implemented correctly of course)? Im inclined to believe that I can, but since I havent finished reading my book I thought Id ask now so I knew before hand.

Share this post


Link to post
Share on other sites
Advertisement
if i understand correctly, then yes. as long as you import java.awt and/or java.awt.swing. and everything else you would do normally such as
text=new jTextField();, etc... You would do it the exact same way in an applet and a normal application.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Absolutely, yes. Applets are top-level containers, just like JFrames, so all the standard GUI code will work with them. Take a look at the following sections of the Java Tutorial:

http://java.sun.com/docs/books/tutorial/applet/practical/gui.html
http://java.sun.com/docs/books/tutorial/uiswing/index.html

--cfmdobbie

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!