Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java dimension

public static void centreWindow(Window frame) {
    Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
    int x = (int) ((dimension.getWidth() - frame.getWidth()) / 2);
    int y = (int) ((dimension.getHeight() - frame.getHeight()) / 2);
    frame.setLocation(x, y);
}
Comment

PREVIOUS NEXT
Code Example
Java :: encapsulation in oop 
Java :: java string array to arraylist 
Java :: spring db properties 
Java :: java.lang.object[4] 
Java :: java for loop increment by 3 
Java :: android sha1 key 
Java :: loop hash map 
Java :: java variables 
Java :: java get month 
Java :: boucle for avec un tableau java 
Java :: Access items from the ArrayList using get() function 
Java :: Java How to use SortedSet? 
Java :: resize array in java 
Java :: android canvas line thickness 
Java :: flink prometheus alert on failed jobs 
Java :: android menu change text color 
Java :: define an array of size n in java 
Java :: multiplication table using while loop in java 
Java :: greater than sign in java 
Java :: convert void * to int 
Java :: how to check number format exception in java 
Java :: richest customer wealth leetcode 
Java :: how to call a function in java 
Java :: how to run java in eclipse 
Java :: bubble sort in java 
Java :: commenting in java 
Java :: java.lang.IllegalArgumentException: View=DecorView@5fd145b[MainActivity] not attached to window manager 
Java :: how to remove a sting character in java 
Java :: java get class name of object 
Java :: convert class to java 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =