codice:
import java.awt.*; 

public class Screen {
	
   public static void centraWindow(Window w) { 
      int x,y; 
      x=(Toolkit.getDefaultToolkit().getScreenSize().width-w.getWidth())/2; 
      y=(Toolkit.getDefaultToolkit().getScreenSize().height-w.getHeight())/2;
      w.setLocation(x,y);
   } 
}
Qualcuno potrebbe spiegarmi il funzionamento di tale classe?