Now it's time to add that screen just mentioned to your project. Adding the screen follows the same steps that you just did to add the UiApplication
class.
1. Right-click on the package and select New | Class.
2. In the New Java Class dialog, enter TipCalcMainScreen as the class name.
3. Select the
MainScreen
class to be the superclass by using the Browse button (just like we did before).4. Unlike last time, make sure that the public static void main (String args[]) checkbox remains unchecked.
Much like before, the package declaration, the import
statement, and the class definition are created automatically for you. It should look a great deal like the code generated for the TipCalcApplication
class except the main
method is not there. Just like before, this is just a starting point and now we need to start modifying it.