0

I want to create an applet with first form have multiple button, each button takes me to another form to perform a specific task.

How to do that using a Java applet?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Mohammed Galal
  • 209
  • 3
  • 10
  • 1
    BTW - Why code an applet? If it is due to spec. by teacher, please refer them to [Why CS teachers should stop teaching Java applets](http://programmers.blogoverflow.com/2013/05/why-cs-teachers-should-stop-teaching-java-applets/). – Andrew Thompson Jan 30 '14 at 01:14

1 Answers1

1

There are lots of different ways to do this. The details depend on what exact effect and feel you are after. For example:

  • A CardLayout in the CENTER controlled by a JList (the menu) in the LINE_START of a BorderLayout.
  • A JTabbedPane, though that doesn't quite fit the use-case here.
  • For a blocking component, look to a free floating modal JDialog or a JOptionPane. This encourages the user to concentrate on one 'transaction' (e.g. new|edit|delete) at a time.
  • Non modal dialogs for when the user can have multiple dialogs/transactions open in parallel.
  • ...

See also


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