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

REGRESSION: Cannot set frame icon on JInternalFrame in Windows L&F

XMLWordPrintable

    • beta2
    • generic, x86
    • generic, windows_98, windows_nt



      Name: krC82822 Date: 06/14/2001


      14 June 2001, eval1127@eng -- this is a merlin (1.4) regression (works
      fine in 1.3.1, for example). See also #'s 4406533, 4231506
      Still reproducible as of build 68 (beta-refresh build).
      -----------
      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

      Setting the frameIcon on an JInternalFrame doesn't work in WindowsL&F:

      import java.awt.*;
      import javax.swing.*;
      import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;

      public class Testcase2 {
        static final String imageFile = "d2admico.gif";
        static final boolean windows = true; // workaround: = false;
        public Testcase2() {
        }
        public static void main(String[] args) {
          try {
            if (windows)
              UIManager.setLookAndFeel(new WindowsLookAndFeel());
          }
          catch (Exception e) {
            e.printStackTrace();
          }
          ImageIcon icon = new ImageIcon(imageFile);
          JFrame frame = new JFrame();
          JDesktopPane desktopPane = new JDesktopPane();
          frame.setBounds(100, 100, 500, 500);
          frame.setIconImage(icon.getImage());
          frame.getContentPane().add(desktopPane);
          frame.setVisible(true);

          JInternalFrame jif = new JInternalFrame("JInternalFrame", true, true, true,
      true);
          jif.setBounds(150, 150, 100, 100);
          jif.setFrameIcon(icon);
          jif.getContentPane().add( new JButton("OK") );
          desktopPane.add(jif);
          jif.setVisible(true);
        }
      }
      (Review ID: 126551)
      ======================================================================

            joutwatesunw Joshua Outwater (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: