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

Window goes to the Bottom (and toFront does not help)

XMLWordPrintable

    • linux_ubuntu

      configuration: Ubuntu 15.04 Linux + Unity + JDK9 b39 (+ HiDPI monitor)

      Please run the following test:


      import java.awt.*;

      public class WindowTest {

          private Window w = new Window((Frame) null);

          public WindowTest() {
                  try {
                      EventQueue.invokeAndWait(() -> {
                          w.setLocation(150, 150);
                          w.setSize(200, 200);
                          w.setBackground(Color.red);
                          w.setVisible(true);
                      });
                  } catch (Exception dummy) { System.err.println("nok"); }
          }

          public void tryToFront() {
                  try {
                      EventQueue.invokeAndWait(() -> {
                          w.toFront();
                      });
                  } catch (Exception dummy) { System.err.println("nok"); }
          }

          public static void main(String[] args) throws Exception {
              WindowTest test = new WindowTest();
              Thread.sleep(2000);
              test.tryToFront();
          }
      }

      the window goes under the terminal; toFront() doesn't help

            Unassigned Unassigned
            avstepan Alexander Stepanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: