Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet in frame

 
Tapan Prajapati
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to use applet in background of frame in swing . is it possible how?
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tapan Prajapati wrote:i want to use applet in background of frame in swing . is it possible how?


This is similar to your other post and is almost a cross-post, a no-no for these forums.

There are several things that can be done but first of all, I'd recommend that your GUI classes not be geared towards creating JApplets but rather JPanels, and then you can decide if you want to place the JPanel into a JApplet's contentPane to be used as an applet, or in a JFrame's contentPane, to be used as a stand-alone program. A JPanel can also be dropped into a JTabbedPane with ease.

But having said this, a JApplet extends Component and it itself can be dropped into a JFrame or JTabbedPane, .... but I like my first suggestion better.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and almost a duplicate of the post the other day

http://www.coderanch.com/t/493048/Swing-AWT-SWT-JFace/java/Applet

why don't you concentrate on a single topic, and start 'replying' so we can see what problems you have.
If it is that you have absolutely no idea, pay someone to do it for you.
 
Tapan Prajapati
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but i cant able to get your answer i had also extended it with jApplet but how can i insert my applet into this jtabbedpane give me example or method of it soon.
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tapan Prajapati wrote:but i cant able to get your answer i had also extended it with jApplet but how can i insert my applet into this jtabbedpane give me example or method of it soon.


Generally the drill here is that first you show your non-working code to us describing in as much detail as necessary what it does and what it is supposed to be doing but doesn't. Then we try to work with you and your code to try to guide you towards a solution.
 
Rob Spoor
Sheriff
Pie
Posts: 20550
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pete stein wrote:
Tapan Prajapati wrote:but i cant able to get your answer i had also extended it with jApplet but how can i insert my applet into this jtabbedpane give me example or method of it soon.

Generally the drill here is that first you show your non-working code to us describing in as much detail as necessary what it does and what it is supposed to be doing but doesn't.

And with "as much detail as necessary", Pete means an SSCCE. We do not want hundreds of lines of code to spit through.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic