The main creates a new Runnable, which allows for a Run() that will invoke on the start-up of the application. The new Domotics().setVisible(true); creates a new instance of Domotics, which I assume extends a Frame, Panel, Form, etc. and makes the application/applet visible.