PREVIOUS UP   Technologies Internet et Education, © TECFA
  4. Applications et applets (à REFAIRE et compléter)

4. Applications et applets (à REFAIRE et compléter)

A. Applications

B. Applets

<APPLET 
  CODE="MySqlQueryLineApplet.class" WIDTH=500 HEIGHT=300
  ARCHIVE="/guides/java/classes/mysql.jar"
>
</APPLET>
 <EMBED type="application/x-java-applet;version=1.2" width="200"
    height="200" align="baseline" code="XYZApp.class"
    codebase="html/" model="models/HyaluronicAcid.xyz"
    pluginspage="http://java.sun.com/products/plugin/1.2/plugin-install.html">
 <NOEMBED>
    No JDK 1.2 support for APPLET!!
 </NOEMBED>
 </EMBED>

4.1 Applets

Exemple 4-1: Very simple Query (My)SQL Applet

Exemple 4-2: Update / Query SQL Applet for COFFEES

Exemple 4-3: Update / Query MySQL Swing Applet for COFFEES

A. Pages HTML

<APPLET 
  CODE="MySqlUpdateLineApplet.class" WIDTH=600 HEIGHT=400
  ARCHIVE="/guides/java/classes/mysql.jar"
>
  <param name=URL value="jdbc:mysql://tecfa2.unige.ch:3306/COFFEEBREAK">
  <param name=USER value="nobody">
  <param name=PASSWORD value="">

</APPLET>
    String url = null;
    String user = null;
    String password = null;
    .....
	url = getParameter("URL");
	user = getParameter("USER");
	// password = getParameter("PASSWORD");
	password = null;

 


PREVIOUS UP -- TIE