• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Run GUI program interface in an applet(viewer)

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a simple program that displays words in a GUI. I want to run this program in an applet so I can access it from anywhere. Any examples or places to find info?
I have a GUI class I created. Can I pass the GUI object I created into to the applet?
FlashcardApplet myFlashcardApplet = new FlashcardApplet(myFlashCardGUI);
Thanks!
[ August 11, 2002: Message edited by: skimbleton ]
 
Sheriff
Posts: 9099
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
skimbleton,

Welcome to JavaRanch! Please adjust your display name to meet the JavaRanch Naming Policy.
You can change it here.

Thanks!
 
Marilyn de Queiroz
Sheriff
Posts: 9099
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question is, "Is there a constructor like this?"
FlashcardApplet myFlashcardApplet = new FlashcardApplet( myFlashCardGUI );

You can pass just about anything into a constructor that you create. What you are going to do with it after you pass it in is a different question.

It seems that if FlashcardApplet extends java.applet.Applet, that you will need at least two constructors.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!