I am unsure of how to code popup message box in my methods.
public String verify(){
String result = \"failed\";
int authcode = staffBean.getVerifyCod
POP UP WINDOWS IN APPLET
hi guys i was searching pop up windows in applet all over the internet but could not find answer for windows.
Although it is simple i am just helping you. Hope you will like it as it is in simpliest form. here's the code :
Filename: PopUpWindow.java
for java file and we need html file too.
For applet let us take its popup.html
CODE:
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
public class PopUpWindow extends Applet{
public void init(){
Button open = new Button("open window");
add(open);
Button close = new Button("close window");
add(close);
Frame f = new Frame("pupup win");
f.setSize(200,200);
open.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if(!f.isShowing()) {
f.setVisible(true);
}
}
});
close.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if(f.isShowing()) {
f.setVisible(false);
}
}
});
}
}
/*
*/
to run:
$javac PopUpWindow.java && appletviewer popup.html