问题描述
我希望在 Glasspane 前面显示一个 InternalFrame。 在我的程序中,用户应该能够点击 FILE -> Settings 并且应该显示一个 InternalFrame。背景中的所有内容都应该用 Glasspane 覆盖。 有人有想法吗?
m21.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Settings settings = new Settings();
//get the InternalFrame
settings.getFrame().setBounds(100,100,getWidth()-200,getHeight()-200);
settings.getFrame().toFront();
setGlasspane(new Glass());
getGlasspane().setVisible(true);
//get the InternalFrame
getlayeredPane().add(settings.getFrame(),BorderLayout.norTH);
getlayeredPane().movetoFront(settings.getFrame());
repaint();
}
});