Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java windowbuilder multiple monitors windowed mode

public Main() {

    JFrame testingBlack = new JFrame("MCVe");

    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice[] gds = ge.getScreenDevices();
    GraphicsConfiguration gc = gds[1].getDefaultConfiguration();
    Rectangle rect = gc.getBounds();
    testingBlack.setLocation(rect.getLocation());

    // or, if you like this style better

    testingBlack.setLocation(GraphicsEnvironment
                             .getLocalGraphicsEnvironment()
                             .getScreenDevices()[1]
                             .getDefaultConfiguration()
                             .getBounds()
                             .getLocation());

    testingBlack.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    testingBlack.setVisible(true);
}
Comment

PREVIOUS NEXT
Code Example
Java :: add java 8 support to pom 
Java :: single dex file error android 
Java :: java opp 
Java :: How to merge two sorted arrays into a single sorted aggregate one? 
Java :: Android Number Picker format JAVA 
Java :: how to compute age from local date 
Java :: Implementing the ArrayList Class in java list 
Java :: nextint java 
Java :: What is the function of an IntentFilter? 
Java :: ArrayList of prime numbers 
Java :: comparer deux entiers java 
Java :: Stop gninnipS My sdroW! javascrip codewars 
Java :: spring boot put invalid cors request 
Java :: dockerfile spring boot 
Java :: java lamda 
Java :: regex pattern for valid identifiers 
Java :: android activity keyboard hide 
Java :: java synchronized method 
Java :: android select video samsung stackoverflow 
Java :: treemap java entryset 
Java :: . Java Program to Delete the Specified Integer from an Array 
Java :: java set font 
Java :: split string to textview in android 
Java :: display 2d array 
Java :: sort a list in java according to last name 
Java :: java do while loop 
Java :: java continue statement 
Java :: Java telegram bot dependency 
Java :: User input (scanner) 
Java :: java change hashmap value 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =