Results 1 to 7 of 7
  1. #1
    augustas656 is offline Senior Member
    Join Date
    Apr 2014
    Location
    United Kingdom
    Posts
    193
    Rep Power
    6

    Default Is there a way to get not default GraphicsDevice but the one application was launched

    This is just for more smoothness, I have dual screen and lets say anyone who launches my Java Application who has more than one screens I don't want to always place it on the main screen, and also, I'm not gonna use any workarounds that could be as simple as getting which screen the mouse is on at the moment of the launch because that is really inefficient. Is there anyway that anyone knows of get an accurate answer to which screen an Application was launched in. If getting which screen the mouse is on is the only way, I don't mind really much, but I don't know how to do that either. If you know but you don't want to explain just direct me to a tutorial that EXACTLY shows what I need here, or atleast very close. Thanks! :)
    Regards
    augustas656

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: Is there a way to get not default GraphicsDevice but the one application was laun

    Read up on the GraphicsEnvironment class in the JDK documentation.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  3. #3
    augustas656 is offline Senior Member
    Join Date
    Apr 2014
    Location
    United Kingdom
    Posts
    193
    Rep Power
    6

    Default Re: Is there a way to get not default GraphicsDevice but the one application was laun

    And I'm suppose to find which I haven't?
    Regards
    augustas656

  4. #4
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: Is there a way to get not default GraphicsDevice but the one application was laun

    Bookmark this site:

    https://docs.oracle.com/javase/8/docs/api/index.html

    It is essential to have it at hand when programming in Java. Simply look at the classes on the left window. They are alphabetized.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  5. #5
    augustas656 is offline Senior Member
    Join Date
    Apr 2014
    Location
    United Kingdom
    Posts
    193
    Rep Power
    6

    Default Re: Is there a way to get not default GraphicsDevice but the one application was laun

    Yeah, I know, that's where I've looked, but what am I suppose to find there? I can't find anything specific to my issue, how do I know if a GraphicsDevice is where an Application is launched? I've checked the methods and the main description?
    Regards
    augustas656

  6. #6
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: Is there a way to get not default GraphicsDevice but the one application was laun

    The GraphicsDevice documentation has a snippet of code that shows you how to open a JFrame on each device. That is about all I can offer since I am unfamiliar with your actual environment. Just look at the code and try to figure out what it is doing.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  7. #7
    augustas656 is offline Senior Member
    Join Date
    Apr 2014
    Location
    United Kingdom
    Posts
    193
    Rep Power
    6

    Default Re: Is there a way to get not default GraphicsDevice but the one application was laun

    Before posting this thread that's where I went to look, and I knew how to get all the graphics devices and from that I could launch my JFrame on either screen, I then tried seaching this specific question on google, and couldn't find anything, this is why I'm here now. I just have dual screen, how do I get GraphicsDevice that belonds to the screen an application was launched in? Actually! I think the best way to do this would be launch it on the main screen and when I stop the game it should rememeber which screen it was for reasons like moving it, remember its resized size, moved position and Graphics Device, gonna look into that... Save this data into some file
    Regards
    augustas656

Similar Threads

  1. Replies: 17
    Last Post: 11-12-2014, 11:20 PM
  2. Replies: 2
    Last Post: 01-23-2013, 09:31 AM
  3. Extending GraphicsDevice for driver
    By ryanthejuggler in forum AWT / Swing
    Replies: 0
    Last Post: 12-15-2012, 10:04 PM
  4. Replies: 0
    Last Post: 02-22-2011, 10:27 AM
  5. How to enable save as option in menu after the application has been launched
    By plenitude in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 12-26-2008, 09:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •