-2

i have one JApplet. I want to integrate with my swing application(just want to add this applet to existing JPanel of my application). JApplet is component and can be added but how to do this? Can you please elaborate with some example?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433

1 Answers1

1
  1. Create an instance of the JApplet
  2. Call the JApplet's instance's init and start methods
  3. Add the JApplet to your application like any other component

If you need to "close" the view with the applet on it, you must call it's stop and possibly it's destory method should you not want to use it again. If you stop the applet and want to re-use it again, you need to call start again

MadProgrammer
  • 343,457
  • 22
  • 230
  • 366