Bonjour
J'ai un problème assez bizarre avec mes JInternalFrames. En effet, dans mon appli, quand je veux les réduire (soit les mettre en icône sur mon JDesktopPane), elles disparaissent tout bonnement.
Voici le comment est fait mon JDesktopPane:
Et le constructeur de mes JInternalFrames:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 private JDesktopPane getJDesktopPane() { if (jDesktopPane == null) { jDesktopPane = new JDesktopPane(); try{ java.net.URL url = getClass().getResource("BioXpr.png"); java.awt.image.BufferedImage image = javax.imageio.ImageIO.read(url); jDesktopPane.setBorder(new CentredBackgroundBorder(image)); } catch(java.net.MalformedURLException murle){ murle.printStackTrace(); } catch(java.io.IOException ioe){ ioe.printStackTrace(); } } return jDesktopPane; }
Où peut bien être le problème ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 public ProjectWindow() { super(); initialize(); } protected void initialize() { this.setSize(JPCR.jFrame.getWidth()/2, JPCR.jFrame.getHeight()/2); this.setJMenuBar(getJJMenuBar()); this.setContentPane(getJContentPane()); this.setTitle(Project.NameProject); this.setDefaultCloseOperation(this.DISPOSE_ON_CLOSE); this.setResizable(true); //this.setFocusable(true); this.setClosable(true); this.setIconifiable(true); this.setMaximizable(true); this.setFrameIcon(JPCR.icon); this.setVisible(true); JPCR.jMenuItem2.setEnabled(true); /*this.setIconifiable(true); this.setFrameIcon(JPCR.icon);*/ /*try{ this.setIcon(false); this.setIconifiable(true); this.setFrameIcon(JPCR.icon); }catch(java.beans.PropertyVetoException pve){ javax.swing.JOptionPane.showMessageDialog(null, "" +pve, "Error", 0); }*/ //this.setFrameIcon(JPCR.icon); }
Merci d'avance de vos réponses.
@++
Partager