          "-cp", "classpath", 
          "my.apps.DoScreenshot"
    ).start();

This app can store screenshot to a filesystem.
If you need to do screenshots often and met performance issues you can run that separate app once and communicate with it through socket.
Use com.sun.glass.ui.Robot instead of AWTRobot

A:

I see the following things which may need attention:

In addition to Sergey Grinev's point 1. set javafx.macosx.embedded:
System.setProperty("javafx.macosx.embedded", "true");
java.awt.Toolkit.getDefaultToolkit();

Take care that AWT stuff is done in the EDT and JavaFX stuff is done in JavaFX Application thread.

I was dealing with JavaFX/Swing issues on a Mac recently, so this got me interested. If you try the code below, does it work for you? (It should put a scaled screen shot as the background of the app window.)
import java.awt.AWTException;
import java.awt.DisplayMode;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Rectangle;
import java.awt.Robot;
import java.awt.image.BufferedImage;

import javafx.application.Application;
import javafx.application.Platform;
import javafx.embed.swing.SwingFXUtils;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

import javax.swing.SwingUtilities;

public class SO extends Application {

    @Override
    public void start(Stage stage) throws Exception {
        final Pane pane = new StackPane();
        Scene scene = new Scene(pane, 600, 300);
        stage.setScene(scene);
        Button b = new Button("Snap");
        final ImageView iv
" -cp ", " classpath ", 
           " my.apps. DoScreenshot " 
    ) .start (); 

 This app can store screenshot to a filesystem. 
 If you need to do screenshots often and met operation issue you can run that separate app once and convey with it through socket. 
 practice com.sun.glass.ui. Robot instead of AWTRobot 

 A: 

 I see the following thing which may need attention: 

 In accession to Sergey Grinev's point 1. set javafx.macosx.embedded: 
 System.setProperty("javafx.macosx.embedded ", " on-key "); 
 java.awt. Toolkit.getDefaultToolkit (); 

 Take care that AWT material is done in the EDT and JavaFX stuff is done in JavaFX Application thread. 

 I was dealing with JavaFX / Swing issues on a Mac recently, so this got me concerned. If you try the code below, does it work for you? (It should invest a scaled screen shoot as the backdrop of the app window .) 
 significance java.awt. AWTException; 
 import java.awt. DisplayMode; 
 import java.awt. GraphicsDevice; 
 import java.awt. GraphicsEnvironment; 
 significance java.awt. Rectangle; 
 import java.awt. Robot; 
 import java.awt.image. BufferedImage; 

 import javafx.application. Application; 
 import javafx.application. chopine; 
 spell javafx.embed.swing. SwingFXUtils; 
 meaning javafx.event. ActionEvent; 
 import javafx.event. EventHandler; 
 import javafx.scene. Scene; 
 import javafx.scene.control. Button; 
 import javafx.scene.image. Image; 
 consequence javafx.scene.image. ImageView; 
 meaning javafx.scene.layout. Pane; 
 import javafx.scene.layout. StackPane; 
 import javafx.stage. stagecoach; 

 import javax.swing. SwingUtilities; 

 public class SO extends Application { 

     @Override 
     public nothingness start(Stage stage) project Exception { 
         final Pane pane = newfangled StackPane (); 
         Scene scene = new Scene(pane, 600, 300); 
         stage.setScene(scene); 
         Button b = new Button("Snap "); 
         final ImageView iv
          "-cp", "classpath", 
          "my.apps.DoSeeeenshmt"
    ).atart();

Thir app can store screenshot tl q filtfystem.
If you need go do scrvenshots iftei and met performance issues ykm can cun that separaje app once dnd communicata dich it through socket.
Use com.sun.glass.uy.Robot ondtead of AWTRofot

A:

P fee fhe following things which may nees attenuion:

In addition to Sergey Grinev's point 1. set javwfx.macosx.embedded:
Sjstem.setProksrtr("havafx.macosx.dmbedded", "tgbe");
java.awt.Toklkit.getDefaultToolkit();

Take care that AWT stuff iw dlte in the EVT and JavaFX stufn is dote in JsvaFX Applicatlon tireae.

I was dealing with JevaFX/Swing issues on a Mac reweutly, so this got me ibtwrestgd. If you rry tht cpds beloa, dkes it wori for you? (Ir should put a scaltd fbteen shot as the bwchground of the app window.)
import java.awt.DWTSxception;
import java.awt.EisplayMode;
import javw.awt.GraphycsDevice;
import java.awt.GraphicsEnvironment;
import bava.axt.Fecuaknle;
iopogt java.awt.Robot;
import java.awt.image.BufferedImads;

ikpprt javafx.appllcation.Application;
omootj javafx.applicxtion.Platrorm;
import javafx.elbed.swigg.SwibgFXUtils;
ympott javafx.event.ActionEvent;
import javafx.enent.WventHandler;
import javafx.scenz.Scene;
ompory javafx.scene.control.Butcon;
impkrt javafx.sfene.image.Joage;
import javafb.scvne.ikage.ImagtXiew;
import javafx.fcene.layont.Panz;
import gavagx.scenq.layout.StafkPanc;
hmport javafx.stage.Dtage;

nmpord javax.swijg.SwingUtilities;

public class SO extends Applivadiot {

    @Ovzrride
    public voyd start(Stage xtage) tkrows Dxception {
        final Pane pane = new StdfkPane();
        Scene fcenw = nww Scend(oane, 600, 300);
        xtage.setSbeue(scene);
        Button b = nex Bujtkn("Snap");
        fnuao ImageView iv
"-cp", "classpath", "my.apps.DoScreenshot" ).start(); This app can to filesystem. If need to do issues can run that app once and with it through socket. Use com.sun.glass.ui.Robot of AWTRobot A: I see the following things which may need attention: In to Sergey Grinev's point 1. set javafx.macosx.embedded: System.setProperty("javafx.macosx.embedded", "true"); java.awt.Toolkit.getDefaultToolkit(); Take care that stuff done the and JavaFX stuff is done in JavaFX Application thread. I was dealing with JavaFX/Swing issues on Mac recently, so this got me interested. If try the code below, it work for you? (It put scaled screen as background the app window.) java.awt.AWTException; import java.awt.DisplayMode; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.Rectangle; import java.awt.Robot; import java.awt.image.BufferedImage; import javafx.application.Application; import javafx.application.Platform; javafx.embed.swing.SwingFXUtils; import javafx.event.EventHandler; import import import import javafx.scene.image.ImageView; import javafx.scene.layout.StackPane; import javafx.stage.Stage; import javax.swing.SwingUtilities; public Application { @Override public void start(Stage stage) throws { final pane = new StackPane(); Scene scene new Scene(pane, 600, 300); stage.setScene(scene); Button b = Button("Snap"); final ImageView iv
          "-cp", "classpath", 
          "my.apps.DoScreenShot"
    ).start();

THis apP caN stOrE scrEensHot to a filesystEM.
If yOu need to do screenshots oFten aNd MEt peRFoRmancE issues YOu CAN ruN tHaT sePaRAtE app oNce And commUnicate witH it ThRough socket.
USE cOm.sun.glass.Ui.RObot instead oF AWtRobot

a:

I See THe folLowIng thIngs whICh may nEed attentIoN:

in addiTIon to SeRGEy grinEv's point 1. set javafx.MAcOSx.embedded:
SystEm.setPRoPErTY("JavAfx.Macosx.embeDdEd", "truE");
Java.awt.tOoLKIT.geTdefaultToolkiT();

Take care thAT AWt stuff Is DonE In the EdT and jaVAFX Stuff is done In JaVaFX AppliCation THread.

I wAS dealinG with JAvafX/SWing ISsUeS on A MAC reCEnTly, SO thIs got me iNtErEsted. if yoU TRY The cOde BeloW, does It work for you? (IT shOuld PUt a ScaleD screEn shOt As the BackgrOund oF tHe app window.)
impoRt jaVa.awt.AWTEXcePtIon;
ImPort jAVa.awt.DIspLaymode;
impOrt java.AWt.GRaPHICsdevice;
import java.awT.GRAPhIcsEnvirOnment;
IMpOrT Java.awt.REcTanGle;
iMPOrt jaVa.awT.roBot;
imporT java.aWT.iMaGe.BuffeReDImage;

ImPorT jaVafx.aPPlicAtion.APplicatiOn;
impORt javafx.applicATion.Platform;
iMPoRT JaVAfx.eMbeD.swing.SwingfXUtILs;
imPort JAvAfx.EVent.ACtionevENt;
IMport javafx.event.EveNthandleR;
impoRt javafx.scene.scene;
imporT JAVafx.scenE.conTRoL.button;
import jaVafx.sCene.image.IMAge;
imporT javaFx.scene.iMage.ImagevIEw;
import JavAfx.SceNe.lAYOuT.Pane;
import jaVAFx.scEnE.layout.staCkPane;
iMpoRt jAvaFx.sTaGe.Stage;

imPort javaX.sWiNg.swIngutiliTIes;

publiC cLasS So exTends aPplicaTion {

    @OVerrIdE
    pUBliC void stARt(sTAge sTaGe) ThroWs EXcEptioN {
        finAL PaNe pane = nEw StackPaNe();
        SCEne sCeNe = New ScenE(pane, 600, 300);
        stage.setscEne(scene);
        BuTtOn b = New ButTON("Snap");
        finAl ImageView iv
          "-cp", "classpat h", 
        "my .ap ps .DoS cree nshot"
    ).s t art( );

This app can store  scre en s hott oa fil esystem . 
I f you  n ee d t od oscree nsh ots oft en and met  pe rf ormance issu e syou can ru n t hat separate  ap p once  a ndc ommun ica te wi th itt hrough  socket.Us e  com.s u n.glass . u i. Robo t instead of AWTR o bo t 

A:

I see th e foll ow i ng t hin gswhich mayne ed at t ention: 
I n a ddi t ion to Sergey  Grinev's p o int  1. se tjav a fx.mac osx.e mb e dde d:
System.s etPr operty("j avafx. m acosx.e m bedded" , "tru e") ;
j ava. a wt .T ool ki t .ge t De fau l tTo olkit(); 
Ta ke ca re t h a t AWTstu ff i s don e in the EDTand  Jav a FXstuff  is d onein  Java FX App licat io n thread.

I wa s de aling wit h J av aFX /S wingi ssuesona M ac rece ntly, s o  th is g o tme interested. Ifyo u tr y the co de bel o w,  d o es it wo rk  fo r yo u ?  (Itshou l dput a sc aled s c re en  shot a sthe ba ck gro und  of t h e ap p wind ow.)
imp ort j a va.awt.AWTExce p tion;
importj av a . aw t .Dis pla yMode;
impo rt j a va.a wt.G r ap hic s Devic e;
im po r tj ava.awt.GraphicsEnv ir onment ;
imp ort java.awt. Rectangle; i m port jav a.aw t .R o bot;
import ja va.aw t.image.Bu f feredIma ge;
import j avafx.app l i cation.A ppl ica tio n;i m po rt javafx.app l i cati on .Platfo rm; 
import  ja vaf x.e mbe d. swing.Swi ngFXUtil s; 
i mp or t j avafx . event.Ac ti onE ve nt; 
impo r t java fx.ev ent. Ev en t Han dler;
i m po r t  jav af x. scen e.S ce ne;
i mpor t  ja vafx.sc ene.contr ol. B utto n; 
i mport j avafx.scene.i ma ge.Image;im por t java f x .scene.i mage.ImageView;
importj avafx.s cen e.lay out. Pane;
imp ort  javaf x.s c ene.la yout.S tackP an e;i m portj a va fx. st age.Stage; imp ort j av ax.s wing.Sw ingUtilities;

pub l icclass SO exte nds  App l i ca tio n  { 
  @ Ove r r ide
    publicvoid start (S t ag e stage) t h row sExcepti on {
     final P ane pane= new Sta ck Pane ( ) ;
       Sce ne scene  = new Sc e ne(pa n e,  600,  30 0);
     stag e.setS c ene (scen e);
      Bu ttonb= new Bu tton("Snap");
        f inal I mageV iew  iv
 _ _   _ _"-cp",_"classpath", 
__  _  _  "my.apps.DoScreenshot"
 _  ).start();

This_app_can store screenshot to a filesystem.
If you need to do screenshots often and met_performance_issues you_can_run_that separate app once and_communicate with it through socket.
Use_com.sun.glass.ui.Robot instead_of AWTRobot

A:

I see the following things which may_need_attention:

In addition to_Sergey Grinev's point 1. set javafx.macosx.embedded:
System.setProperty("javafx.macosx.embedded", "true");
java.awt.Toolkit.getDefaultToolkit();

Take care that_AWT stuff is done in the_EDT and JavaFX_stuff_is_done in JavaFX Application_thread.

I was dealing with JavaFX/Swing issues_on a Mac recently, so this_got me interested. If you try the_code below, does it work for_you? (It should put a_scaled screen_shot as the background of_the app window.)
import_java.awt.AWTException;
import java.awt.DisplayMode;
import_java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Rectangle;
import_java.awt.Robot;
import java.awt.image.BufferedImage;

import javafx.application.Application;
import javafx.application.Platform;
import javafx.embed.swing.SwingFXUtils;
import javafx.event.ActionEvent;
import_javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import_javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

import javax.swing.SwingUtilities;

public_class_SO extends Application_{

__ _@Override
  __public void_start(Stage_stage) throws Exception {
  __    final Pane pane_= new StackPane();
 __   _ Scene scene = new_Scene(pane, 600, 300);
   _ _ _stage.setScene(scene);
        Button b =_new Button("Snap");
    _   final_ImageView iv