Hi,
I have an application that uses JFrame and JInternalFrames. When I use JRE 1.5, the JINternalFrame iconify using the code I have when the icon selection is made on the window. In 1.6 it does not work and I cannot determine what has changed.
Below is a new application I wrote with condensed code that illustrates the issue
Here is the FRAME
package com.orion.client;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class MainClass extends JFrame
{
public MainClass()
{
this.addWindowListener(new WindowAdapter()
{public void windowClosing(WindowEvent e){System.exit(0);}});
try{UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());}
catch(Exception e){}
JPanel mainPanel = new JPanel();
mainPanel.setBackground(Color.white);
mainPanel.setPreferredSize(new Dimension(800, 600));
mainPanel.setBorder(BorderFactory.createEtchedBorder());
getContentPane().add(mainPanel);
pack();
setVisible(true);
getLayeredPane().add(new TestInternalFrame());
}
public static void main(
String[] args)
{
new MainClass();
}
}
Here is the JINTERNALFRAME
package com.orion.client;
import javax.swing.*;
import java.awt.*;
public class TestInternalFrame extends JInternalFrame
{
public TestInternalFrame()
{
super();
setAutoscrolls(true);
setResizable(true);
setMaximizable(true);
setClosable(true);
setIconifiable(true);
JLabel aLabel = new JLabel("This is a
Test Screen");
JPanel aPanel = new JPanel();
aPanel.setPreferredSize(new Dimension(200, 200));
aPanel.add(aLabel);
this.getContentPane().add(aPanel);
pack();
setVisible(true);
}
}
and attached is a screen shot of the result. I attempt to iconify the internal frame and the _ converts to two overlapped boxes and the screen doesnt iconify