Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet In Browser

 
parag Joshi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Question is a class extended from the Dialog class which is called in applet remains Modal (i.e does not give control to applet in appletviewer , but becomes nonmodal when the same class is opened in Browser (HTML file). the ode is as follows.
Applet code when calling
...
Frame f=new Frame("Application");
PositionsDialog d=new PositionsDialog(f,"Positions",200,mpMyMap);
d.setVisible(true);
...

/*Positions Dialog.*/
import java.awt.*;
import java.awt.event.*;
import CloseWindow;
public class PositionsDialog extends Dialog implements ActionListener{
private Button Ok,Cancel;
public PositionsDialog(Frame parent,String title,int width,GcisMap Map)
{
super(parent,title,true);
setSize(width,200);
setResizable(false);
setLayout(null);
Ok=new Button("Ok");
Cancel=new Button("Cancel");
Ok.setBounds(1,158,95,20);
Cancel.setBounds(100,158,95,20);
Ok.addActionListener(this);
Cancel.addActionListener(this);
add(Ok);
add(Cancel);
addWindowListener(new CloseWindow());
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==Ok)
setVisible(false);
}
}

Any body having idea of how to solve Please mail at anill_arts@yahoo.com
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic