Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can we start one applet from another applet

 
kumar amrendra
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have created 3 applets 1st for the rules having ok and exit button.2nd for input having a textfield and ok,cancel and exit buttons.3rd is for output where there is a textarea and retry and ok button.now the problem is that i want when i click ok in rules window it should disappear and input window should come up and like wise.
note:All applets are of different sizes.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

An applets can't be replaced by another one. You can load a different web page that shows the second applet, though, through the showDocument method.

Maybe you can make it a single applet, and show the 3 different screen by using a CardLayout?
 
kumar amrendra
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thnx dear
i did something of that sort but notwith cardlayout since my applets are of different sizes.i m making them in 1 applet only .resizing and add n removing components....
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you doing the resizing in appletviewer? I'm asking because on a real web page applets can't be resized.

I think using CardLayout would a much cleaner solution than adding and removing components every time you need to switch between pages.
 
kumar amrendra
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but how would i resize them in cardlayout
 
kumar amrendra
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can frames be used in cardlayout instead of panels.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. Frames are top-level classes that correspond to actual windows. You can't use them inside of other components.

And as said before, resizing isn't possible in real applets. You'd need to come up with a layout that can accommodate pages of various sizes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic