Dimension s = owner.getSize(); setLocation( (int) ( s.getWidth() - getWidth() ) / 2, (int) ( s.getHeight() - getHeight() ) / 2 );
DialogUtil.center(this, owner);
	public NewAlbumDialog( Frame owner, Gallery gallery, Album defaultAlbum ) {		super( owner, true );		this.gallery = gallery;		this.defaultAlbum = defaultAlbum;		try {			jbInit();		} catch ( Exception e ) {			e.printStackTrace();		}		pack();		Dimension s = owner.getSize();		setLocation( (int) ( s.getWidth() - getWidth() ) / 2, (int) ( s.getHeight() - getHeight() ) / 2 );		setVisible( true );	}