About 8,740,000 results
Open links in new tab
  1. java - What is the difference between Swing and AWT ... - Stack …

    Jan 3, 2009 · People used to invest lots of effort to get their AWT applications to work consistently across platforms - for instance, they may try to make calls into native code from Java. …

  2. What is the benefit of setting java.awt.headless=true?

    When run with -Djava.awt.headless=false (and without an X window server) will throw an exception instead: java.awt.AWTError: Can't connect to X11 window server using ':0.0' as the …

  3. java - "No X11 DISPLAY variable" - what does it mean? - Stack …

    2-) If your java app has no GUI. While you are running the app, you can try java.awt.headless=true flag as: java -Djava.awt.headless=true -jar gate-5.0-beta1-build3048 …

  4. swing - Resizing image in Java - Stack Overflow

    May 21, 2019 · If you have an java.awt.Image, resizing it doesn't require any additional libraries. Just do: Image newImage = yourImage.getScaledInstance(newWidth, newHeight, …

  5. The import java.awt cannot be resolved - Stack Overflow

    From Java 9 onwards, Java is modularized. awt is 99% useless in Java apps and is therefore in a separate module (java.desktop) that is not loaded by default. You must explicitly tell Java to …

  6. Getting a HeadlessException: No X11 DISPLAY variable was set

    Dec 17, 2019 · import java.awt.GraphicsEnvironment; // Inside main method: System.out.println(GraphicsEnvironment.isHeadless()); The above code printed true when …

  7. java - How to create a KeyEvent - Stack Overflow

    Feb 14, 2013 · java. awt. event. KeyEvent @Deprecated public KeyEvent(Component source, int id, long when, int modifiers, int keyCode) Deprecated. as of JDK1.1 KeyEvent public …

  8. "The import java.awt cannot be resolved" and - Stack Overflow

    Hover over "java.awt" in your code, and under quick fixes available, select Fix Project Setup. Pop-up displays saying "The following proposals have been found..." and "Add Library JRE System …

  9. Meaning of headless and -D option in JAVA_OPTS - Stack Overflow

    Jul 6, 2013 · "java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment" To avoid this situation, the graphics code needs to be told …

  10. java.awt.AWTError: Can't connect to X11 window server using …

    Apr 5, 2023 · Based on the localhost:10.0 value of DISPLAY, it seems likely that you are connecting to the raspberry pi via SSH and your SSH client is attempting to do X forwarding …

Refresh