0

I would like to create an interactive Java Applet for assessment questions. Something like an (Applet Based Examination) that would run on Internet Explorer(v.7) browser for my students to take the exam online.

I am using NetBeans to create my Applet but I couldn't understand the difference between each of the following JApplet files/forms.

  1. New File -> Java -> JApplet
  2. New File -> Java -> Applet
  3. New File -> Swing GUI Forms -> JApplet Form
  4. New File -> AWT GUI Forms -> Applet Form

Which file/form should I choose and what are the considerations to be taken for choosing each file/form?

On another note, I would like to implement a video inside my applet (particular for a section on video analysis questions portion). Any suggestions on how could I achieve this?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Derek
  • 2,185
  • 4
  • 20
  • 24

2 Answers2

2

Answer:

e) None of the above

For a GUI..

..for my students to take the exam online.

Create a JFrame based application, and launch it from a link using Java Web Start.

Netbeans probably has a wizard for JWS projects. Perhaps see Enabling Java Web Start in the NetBeans IDE for further details.

Update 1: AWT vs. Swing

One of the most relevant differences between AWT (e.g. Applet/Frame) & Swing (JApplet/JFrame) is that AWT is last millennium's GUI toolkit. Use Swing this millennium.

See a quick overview of the advantages of Swing over AWT for more details.

Update 2: GUI designer vs. coding by hand

I recommend not choosing any Netbeans GUI making project that ends in 'Form', if that means the GUI designer. A GUI designer offers great productivity gains to developers who already understand the layouts1, and how to nest2 them inside one another to layout a GUI in a logical and resizable way. But for a new programmer, they just get in the way, and produce horrendous code that few people will look at, let alone help debug.

  1. See Laying Out Components Within a Container for more details on layouts.
  2. There is a nice screenshot of a nested layout (with links to the code) in the post mentioned above discussing Swing vs. AWT.

Update 3: Further clarification

Do you have any examples of such JFrame based application for questionaires?

Not offhand (again, worthy of a question of its own - please stop thinking of 'a' question as some sort of 'one-stop shop').

Will this also be able to be integrated with MySQL Database as the questions will be pooled from there?

MySQL integration:

  • Server-side: Just as easy for an applet or JWS application if the DB is on the same server as the app. The app. needs to be trusted either way to reach out to a remote server.
  • Client side. Easier to get up and running using a JWS app.
Community
  • 1
  • 1
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
  • Do you have any examples of such JFrame based application for questionaires? Will this also be able to be integrated with MySQL Database as the questions will be pooled from there ? – Derek Mar 22 '12 at 14:24
1
  • JApplet :

Creates a new JFC (Swing) applet. An applet is a Java class that can run in any Java-enabled browser. Note: This template does not contain form code that allows you to design the applet visually in the Form Editor. For visual design, start with the JApplet template under Java GUI Forms.

  • Applet :

Creates a new AWT (Abstract Window Toolkit) applet. An applet is a Java class that can run in any Java-enabled browser. Note: This template does not contain form code that allows you to design the applet visually in the Form Editor. For visual design, start with the Applet template under Java GUI Forms | AWT Forms.

  • JApplet Form :

Creates a new JFC (Swing) Applet. An applet is a Java class that can be run in any Java-enabled browser.

  • Applet Form :

Creates a new AWT (Abstract Window Toolkit) Applet. An applet is a Java class that can run in any Java-enabled browser.

So the main differences are :

  • Use AWT or Swing

  • Use the Netbeans GUI designer (for Form) or not

alain.janinm
  • 19,951
  • 10
  • 65
  • 112