0

i have a javaFX application running on a laptop with an external screen connected, everything was fine, reinstalled windows and now the application doesnt show on the external screen, but runs normally on the built in laptop screen,, pictures:

  • built in screen as main display

built in screen as main display

  • external screen as main display

enter image description here

Using :

  • windows 10
  • eclipse neon
  • jdk 1.8_102

i also tried disconnecting the laptop screen but it just doesn't run on the external screen !!

this may not make any deference but this is how i create my stages :

/**
 * @param title
 * @param root
 * @return
 */
public Stage getStage(String title,Parent root) {
    Scene scene = new Scene(root);
    Stage stage = new Stage();  
    stage.initModality(Modality.APPLICATION_MODAL);
    stage.setResizable(false);
    stage.setScene(scene);
    stage.setTitle(title);
    return stage;
}

thank you ))

Abdullah Asendar
  • 574
  • 1
  • 5
  • 31
  • Is this program a jar? If so, try running from command prompt `java -jar path/to/jar/file.jar`. That way you can see stacktraces if they are populating in the command prompt. If this is not the case, do you have a log file? Are you running through eclipse? Are you getting any stacktraces? – Orin Sep 14 '16 at 13:56
  • running thou eclipse , the logs are super normal ,, attaching the logs in a minute – Abdullah Asendar Sep 14 '16 at 13:59
  • 2
    My first guess would be something to do with DirectX / graphics drivers. Maybe try updating graphics drivers, or try running with `-Dprism.order=sw` (forcing software rendering) to see if it makes a difference? – Itai Sep 14 '16 at 14:01
  • @sillyfly -Dprism.order=sw did the job !!!! but what does that even do – Abdullah Asendar Sep 14 '16 at 14:03
  • @sillyfly post an answer to close this – Abdullah Asendar Sep 14 '16 at 14:03
  • 3
    It forces software rendering - it's not a good solution, as you will probably experience reduced performance. But it means JavaFX is having some trouble with your GPU, so updating the drivers may help. – Itai Sep 14 '16 at 14:13
  • @sillyfly actually you are right,,, experiencing unacceptable lag ,, will try updating the drivers – Abdullah Asendar Sep 14 '16 at 14:19

0 Answers0