<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Robot.createScreenCapture does not capture dock and top bar in gnome-shell in Other HPE Product Questions</title>
    <link>https://community.hpe.com/t5/other-hpe-product-questions/robot-createscreencapture-does-not-capture-dock-and-top-bar-in/m-p/6999894#M2758</link>
    <description>&lt;P&gt;I am creating a screen share program in Java, but I have a problem: the method that I use to take the screen capture,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Robot.createScreenCapture, does not capture the entire screen. I am using the official Oracle JDK 8 with OpenJFX, and I am running Ubuntu 17.04 with gnome-shell 3.24.1 on an HP Pavilion Elite HPE desktop computer.&lt;/P&gt;&lt;P&gt;The dock and top bar are black. Here is a screenshot taken by&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Robot.createScreenCapture:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2s1xy" style="width: 1280px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/102055iFDC087CF875EF150/image-size/large?v=v2&amp;amp;px=2000" role="button" title="2s1xy" alt="2s1xy" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This simple code was used to take it:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import javax.imageio.ImageIO;

public class ScreenGrab {
  public static void main(String[] args) {
    try {
        Thread.sleep(5000);
      Rectangle grabRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
      Robot robot = new Robot();
      BufferedImage capture = robot.createScreenCapture(grabRect);
      ImageIO.write(capture, "PNG", new File("java-screen-shot.png"));
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}&lt;/PRE&gt;&lt;P&gt;The closest thing I could find to my problem is this bug in OpenJDK with &lt;A href="https://mindmajix.com/oracle-pl-sql-training" target="_blank"&gt;Oracle SQL&lt;/A&gt;. I also couldn't find any screenshot libraries.&lt;/P&gt;&lt;P&gt;Every question on SO that asked about a Java screenshot library was referred to Robot.createScreenCapture.&lt;/P&gt;&lt;P&gt;Can you help me figure this out?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Mar 2018 05:10:48 GMT</pubDate>
    <dc:creator>masonjames</dc:creator>
    <dc:date>2018-03-16T05:10:48Z</dc:date>
    <item>
      <title>Robot.createScreenCapture does not capture dock and top bar in gnome-shell</title>
      <link>https://community.hpe.com/t5/other-hpe-product-questions/robot-createscreencapture-does-not-capture-dock-and-top-bar-in/m-p/6999894#M2758</link>
      <description>&lt;P&gt;I am creating a screen share program in Java, but I have a problem: the method that I use to take the screen capture,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Robot.createScreenCapture, does not capture the entire screen. I am using the official Oracle JDK 8 with OpenJFX, and I am running Ubuntu 17.04 with gnome-shell 3.24.1 on an HP Pavilion Elite HPE desktop computer.&lt;/P&gt;&lt;P&gt;The dock and top bar are black. Here is a screenshot taken by&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Robot.createScreenCapture:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2s1xy" style="width: 1280px;"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/102055iFDC087CF875EF150/image-size/large?v=v2&amp;amp;px=2000" role="button" title="2s1xy" alt="2s1xy" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This simple code was used to take it:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import javax.imageio.ImageIO;

public class ScreenGrab {
  public static void main(String[] args) {
    try {
        Thread.sleep(5000);
      Rectangle grabRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
      Robot robot = new Robot();
      BufferedImage capture = robot.createScreenCapture(grabRect);
      ImageIO.write(capture, "PNG", new File("java-screen-shot.png"));
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}&lt;/PRE&gt;&lt;P&gt;The closest thing I could find to my problem is this bug in OpenJDK with &lt;A href="https://mindmajix.com/oracle-pl-sql-training" target="_blank"&gt;Oracle SQL&lt;/A&gt;. I also couldn't find any screenshot libraries.&lt;/P&gt;&lt;P&gt;Every question on SO that asked about a Java screenshot library was referred to Robot.createScreenCapture.&lt;/P&gt;&lt;P&gt;Can you help me figure this out?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Mar 2018 05:10:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/other-hpe-product-questions/robot-createscreencapture-does-not-capture-dock-and-top-bar-in/m-p/6999894#M2758</guid>
      <dc:creator>masonjames</dc:creator>
      <dc:date>2018-03-16T05:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Robot.createScreenCapture does not capture dock and top bar in gnome-shell</title>
      <link>https://community.hpe.com/t5/other-hpe-product-questions/robot-createscreencapture-does-not-capture-dock-and-top-bar-in/m-p/6999895#M2759</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;HPE software are&amp;nbsp;now part of a new company, Micro Focus. So you will need to repost your question to the new Micro Focus Community at&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.softwaregrp.com/" target="_blank" rel="nofollow noopener noreferrer noopener noreferrer"&gt;https://community.softwaregrp.com/&lt;/A&gt;&lt;BR /&gt;Or,&lt;/P&gt;
&lt;P&gt;If it is related to HP Desktop then you'll have to register and post your query in HP Inc Support Forum.&lt;/P&gt;
&lt;P&gt;Here is the link:&lt;/P&gt;
&lt;P&gt;&lt;A title="https://h30434.www3.hp.com/" href="https://h30434.www3.hp.com/" target="_blank"&gt;https://h30434.www3.hp.com/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Mar 2018 05:29:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/other-hpe-product-questions/robot-createscreencapture-does-not-capture-dock-and-top-bar-in/m-p/6999895#M2759</guid>
      <dc:creator>Parvez_Admin</dc:creator>
      <dc:date>2018-03-16T05:29:10Z</dc:date>
    </item>
  </channel>
</rss>

