I have problem with this applet. the browser gives page.I don't know wether its not loading or if its extremely slow.Also I am confused on the html part.Should I use tag object or applet and for entering class name data,classid or name.
html tag:-import java.lang.reflect.InvocationTargetException; public class NewJApplet extends javax.swing.JApplet { @Override public void init() { this.add(fesText); this.add(jButton1); this.add(jLabel1); this.add(jLabel2); this.add(jPanel1); this.add(jPanel2); this.add(msgText); this.add(jScrollPane1); try { java.awt.EventQueue.invokeAndWait(new Runnable() { @Override public void run() { initComponents(); } }); } catch (InterruptedException | InvocationTargetException ex) { } } private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { switch(fesText.getText().toLowerCase()){ case "christmas": msgText.setText("HAPPY CHRISTMAS"); break; case "diwali": msgText.setText("HAPPY DIWALI"); break; default: msgText.setText("ENTER VALID FESTIVAL"); break; } private javax.swing.JTextField fesText; private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTextArea msgText;
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div><object data="JApplet.class" height="170" width="150"></object></div>
</body>
</html>
--- Update ---
Sorry missed a word the browser gives a blank page