I\'m a .Net developer but somehow I was task to create a simple application in java for some extra reason. I was able to create that application but my problem is how can i cent
i hope this will be helpful.
put this on the top of source code :
import java.awt.Toolkit;
and then write this code :
private void formWindowOpened(java.awt.event.WindowEvent evt) {
int lebar = this.getWidth()/2;
int tinggi = this.getHeight()/2;
int x = (Toolkit.getDefaultToolkit().getScreenSize().width/2)-lebar;
int y = (Toolkit.getDefaultToolkit().getScreenSize().height/2)-tinggi;
this.setLocation(x, y);
}
good luck :)