This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information

Center screen before showing?

General questions regarding the development with ProjX.

Center screen before showing?

Postby johnit » Tue Mar 28, 2017 4:23 pm

Is it possible to center the screen before it will be shown?

Calling center() in constructor didn't work
Posts: 45
Joined: Fri Nov 16, 2012 5:58 pm

Re: Center screen before showing?

Postby Support@SIB » Tue Mar 28, 2017 4:25 pm

center() doesn't work in constructor because the frame isn't available at this time.

You should override onActivate:

Code: Select all
public void onActivate() throws Throwable


The screen is only the content and doesn't know anything about the representation (frame, embedded, ...). Usually it's a simple panel.
User avatar
Posts: 353
Joined: Mon Sep 28, 2009 1:56 pm

Return to Development