![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e599. Centering a Frame, Window, or Dialog on the Screen// Get the size of the screen Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); // Determine the new location of the window int w = window.getSize().width; int h = window.getSize().height; int x = (dim.width-w)/2; int y = (dim.height-h)/2; // Move the window window.setLocation(x, y);
e600. Getting the Number of Screens e601. Enabling Full-Screen Mode e602. Double-Buffering in Full-Screen Mode e603. Getting the Available Screen Sizes, Refresh Rates, and Number of Colors e604. Getting the Current Screen Refresh Rate and Number of Colors e605. Setting the Screen Size, Refresh Rate, or Number of Colors
© 2002 Addison-Wesley. |