Page 205 - CTS - CSA TP - Volume 2
P. 205

COMPUTER SOFTWARE APPLICATION - CITS




           8  Make the frame visible:






           This line makes the frame visible. Without this, the frame would be created but not displayed on the screen.
           9  Close the constructor:







           This line closes the constructor of the SimpleContainer class.
           10 Main method:







           This line starts the main method, which serves as the entry point of the program.
           11 Create an instance of SimpleContainer:

           This line creates an instance of the SimpleContainer class, passing the string “Simple Container Example” as the
           title.
           12 Close the main method and the class:






           These lines close the main method and the SimpleContainer class.
           This program creates a simple graphical window (frame) with a label saying “Hello, I’m a simple container!” and
           displays it on the screen when executed.
           Output:



































                                                           190

                              CITS : IT & ITES - Computer Software Application - Exercise 116
   200   201   202   203   204   205   206   207   208   209   210