2

I want to build a JApplet application, consists of 5 pages. Given data in one page will be input for next page. Based on given data I have to show different options in next page.

I am completely new to applets, previously worked with web applications. I need something similar to MVC but should completely with applets (Swing JApplet). Is there any framework like struts to implement it?

Please give me some ideas. How do I proceed?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
nutim
  • 169
  • 3
  • 15

1 Answers1

3

For me it's something like wizard.

I would define a cutom model class storing data for each page and define 5 JPanels to represent the model's data for each step.

Then all the 5 panels should be placed in a container with CardLayout.

Moving to the next step reads current step data, stores the data in model and prepares the model's data for the next step.

After that card swapped and new step's panel is shown reflected prepared data from the model.

StanislavL
  • 56,971
  • 9
  • 68
  • 98
  • Agree with [`CardLayout`](http://docs.oracle.com/javase/7/docs/api/java/awt/CardLayout.html) (as seen in this [short example](http://stackoverflow.com/a/5786005/418556)) as the best approach for this. – Andrew Thompson Mar 01 '14 at 05:56