Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionJInternalFrame[] getAllFrames() Returns all JInternalFrames currently displayed in the desktop.
public class Fermer extends JDesktopPane { void toutFermer(){ JInternalFrame [] Frames = getAllFrames(); try{ for( int i = 0; i<Frames.length; ++i) Frames[i].setClosed(true); }catch(PropertyVetoException pve){} } }
public class Fermer extends JDesktopPane { void toutFermer(){ JInternalFrame [] Frames = getAllFrames(); try{ for( int i = 0; i<Frames.length; ++i) Frames[i].setClosed(true); }catch(PropertyVetoException pve){} } }
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { new Fermer(); }
button.addActionListener(new ActionListener(){ @Override public void actionPerformed(ActionEvent e){ new Fermer(); } });