Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4178448

JInternalFrame setMaximum(true) does not show up.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.0
    • client-libs



      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)
      ======================================================================

            rschiavisunw Richard Schiavi (Inactive)
            tbell Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: