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

Linux dialog modal inconsistency with setDefaultLookAndFeelDecorated

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 6
    • client-libs
    • x86
    • linux

      FULL PRODUCT VERSION :
      java version "1.6.0"
      Java(TM) SE Runtime Environment (build 1.6.0-b105)
      Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Ubuntu 6.10

      Linux fkj-desktop 2.6.17-11-generic #2 SMP Thu Feb 1 19:52:28 UTC 2007 i686 GNU/Linux


      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Using GNOME desktop environment version 2.16

      A DESCRIPTION OF THE PROBLEM :
      The problem happens when I set JFrame.setDefaultLookAndFeelDecorated() and JDialog.setDefaultLookAndFeelDecorated() true and affects JOptionPane and JDialog. I've observed the following behaviors when a dialog is being showed:
      - If I click anywhere inside the application that called the dialog it goes background.
      - If I click on the window list panel to make my application visible again(it was minimized or I clicked on any other application) the dialog goes background.
      - If click on any other application to make visible and just minimize it to make my application visible, the dialog is still visible.
      - Whenever the dialog goes background it doesn't loses focus and I have to shift between the opened windows(ALT + TAB) to make it visible again.

      If I set only JDialog.setDefaultLookAndFeelDecorated() true it works correctly.

      I also tested on Windows XP SP2, this bug doesn't happen there.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      - Create a JFrame
      - Set JFrame.setDefaultLookAndFeelDecorated() and JDialog.setDefaultLookAndFeelDecorated() true
      - From the JFrame call JOptionPane.showMessageDialog(null, "test")

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Behave the same way that when only JDialog.setDefaultLookAndFeelDecorated() is true
      ACTUAL -
      The dialogs go background. Its necessary to shift between the windows(ALT + TAB) to make them visible again.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.JDialog;
      import javax.swing.JFrame;
      import javax.swing.JOptionPane;
      import java.awt.Dimension;

      public class Test extends JFrame
      {
      public Test()
      {
      super();
      initialize();
      }

      private void initialize()
      {
      setSize(new Dimension(600, 400));
      setTitle("Test");
      }

      public static void main(String[] args)
      {
      JFrame.setDefaultLookAndFeelDecorated(true);
      JDialog.setDefaultLookAndFeelDecorated(true);
      new Test().setVisible(true);
      JOptionPane.showMessageDialog(null, "test");
      }
      }
      ---------- END SOURCE ----------

            art Artem Ananiev (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: