JDK-4178448 : JInternalFrame setMaximum(true) does not show up.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1998-10-02
  • Updated: 1998-10-12
  • Resolved: 1998-10-12
Related Reports
Duplicate :  
Description

Name: tb29552			Date: 10/02/98


/* 

When calling setMaximum(true) on a JInternalFrame
follow it's creation, it does not show up? It should
though. Below is the code for this.

To reproduce:

    javac JeffIntFrames.java

    java JeffIntFrames            (will run with no setMaximum() call)

    java JeffIntFrames mumble     (any argument will call setMaximum(true))

*/
import com.sun.java.swing.*;
import java.awt.*;

public class JeffIntFrames {

    public static void main(String[] args) {
        JFrame f = new JFrame("Internal Frames Example 1");
        JDesktopPane pane = new JDesktopPane();
        f.getContentPane().add(pane);

        JInternalFrame frame = new JInternalFrame("Frame 1", true, true, true, true);
        frame.setBounds(10, 10, 150, 100);
        pane.add(frame, JDesktopPane.DEFAULT_LAYER);
        try
        {
            if (args.length > 0) {
                frame.setMaximum(true);
            }
            frame.setSelected(true);
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
        f.setSize(3 * d.width / 4, 3 * d.height / 4);
        f.setVisible(true);
    }
}

(Review ID: 39862)
======================================================================