[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 583: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 639: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
Gephi forums •Popup on Startup
Page 1 of 1

Popup on Startup

Posted: 09 Jul 2010 18:35
by Mountaineer
Hello!

I'd like to create a popup of some sort which gets initialized on program startup (very similar to the Welcome Screen). I know the Welcome Screen itself is made from AWT/Swing.

My question is about the core of Gephi. What calls the Welcome Screen, and can I put in something from a plugin in there? Thanks!

Re: Popup on Startup

Posted: 12 Jul 2010 09:32
by mbastian
Hi,

You have special class named Installer that can be executed when your module is inited. That is how the Welcome Screen is working. You can go tot the Gephi source code, and have a look at "WelcomeScreen/Installer.java". The Welcome Screen uses a TopComponent but you simply create a JPopup there.

Create a new plugin, then Right-Click on your module, select "New > Module Development > Installer". Now you can write the code to create your popup and show it.

If you need to get the frame as parent you can do, after including "Window Systems API" as dependency:

Code: Select all

WindowManager.getDefault().getMainWindow()