hi guys, am stil new to java their was a snippest code about getting screen size i've being seeing onine calling window.getSize() in what package is the object located.
// Get the size of the screen
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
// Determine the new location of the window
int w = window.getSize().width; //what package is window.getSize() from?
int h = window.getSize().height; //what package is window.getSize() from?
int x = (dim.width-w)/2;
int y = (dim.height-h)/2;
// Move the window
window.setLocation(x, y);
it will be helpful if someone can say something