Forms can be loaded as a SFrame or a SDialog. Parts of the form can be loaded as a MainPanel.
After loading the form as SFrame or SDialog the method afterLoading() is called. At the end the form is made visible.
The following code fragment loads and initializes a form as SFrame. The frame is made visible.
Example:
try { SFrame frame = ObjectLoader.getSFrame( "Formulare//TestInternal.form"); frame.afterLoading(); frame.setVisible(true); } catch (AccessDeniedException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); }
This code fragments loads and initializes a form as SDialog. The Dialog is made visible.
try { SDialog dialog = ObjectLoader.getSDialog(frame, "Formulare//TestInternal.form",modal); dialog.afterLoading(); dialog.show(); } catch (AccessDeniedException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); }