怎样让窗体居中显示
------解决方案--------------------
public void setCenter(){
Toolkit kit = Toolkit.getDefaultToolkit();
Dimension screenSize=kit.getScreenSize();
int width = screenSize.width;
int height = screenSize.height;
int x=(width -WIDTH)/2;
int y=(height - HEIGHT)/2;
setLocation(x,y);
}