一个有菜单栏的窗口A继承了Frame,点击菜单栏弹出另外一个窗口B,
怎样将其设置为点击A上的菜单栏,弹出窗口B后,A窗口不能在点击,只有关闭B后才能在点击
用delphi是有个show和showModal方法,在java中怎样设置
FrameA
import java.awt.*;
import java.awt.event.*;
public class FrameA extends Frame implements ActionListener{
Button ButtonOk =new Button ( "ok ");
public FrameA(){
super ( "111 ");
setLayout(null);
setSize(100,200);
ButtonOk.setBounds(100,100,35,50);
ButtonOk.addActionListener(this);
add(ButtonOk);
setVisible(true);
validate();
}
public static void main(String[] args){
FrameA fr=new FrameA();
}
public void actionPerformed(ActionEvent e){
FrameB b=new FrameB();