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

JInternalFrame icon position unchanged w/ resize

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.0
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      swing1.0fcs
    • CPU:
      x86
    • OS:
      windows_nt

      Description



      Name: rm29839 Date: 02/09/98


      Two internal frames are created in a JFrame.
      Each one of them is iconified and then
      uniconified. If the JFrame is then resized, the
      internal frames, when iconified, are positioned
      at the previous location, and not at the bottom
      of the JFrame.
      Here is the source code:
      -----------------------------------------------
      import com.sun.java.swing.*;
      import java.awt.*;
      import java.awt.event.*;

      public class Test1 {
      public static void main( String[] args )
      {
      JFrame frame = new JFrame("Jframe");
      frame.setSize(500, 300);

      frame.addWindowListener( new WindowAdapter() {
      public void windowClosing( WindowEvent e ) {
      System.exit(0);
      }});

      JDesktopPane dp = new JDesktopPane();
      dp.setOpaque(true);
      frame.getContentPane().add(dp);

      Rectangle r = new Rectangle(10, 10, 150, 150);
      JInternalFrame iframe = createInternalFrame( "First", r, Color.red );
      dp.add(iframe, JLayeredPane.PALETTE_LAYER);

      r = new Rectangle(200, 100, 150, 150);
      iframe = createInternalFrame( "Second", r, Color.yellow );
      dp.add(iframe, JLayeredPane.PALETTE_LAYER);

      frame.setVisible(true);
      }

      public static JInternalFrame createInternalFrame(
      String name, Rectangle bounds, Color c )
      {
      JInternalFrame iframe = new JInternalFrame(name, true, true, true, true);
      iframe.setBackground( c );
      iframe.setBounds(bounds);
      return iframe;
      }
      }
      (Review ID: 24776)
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              tballsunw Tom Ball (Inactive)
              Reporter:
              rmandelsunw Ronan Mandel (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: