Now that you have the class created with some of the boilerplate code it's time to expand it and make the application actually do something.
1. You can start off by giving the static
main
function something to do. Replace themain
method with the following code./** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub // Create a new instance of the application. TipCalcApplication theApp = new TipCalcApplication(); // To make the application enter the event thread and start processing messages, // we invoke the enterEventDispatcher() method. theApp.enterEventDispatcher(); }
2. Secondly, you need to add the
TipCalcApplication
constructor to the class so add the following code.private TipCalcApplication() { // Push the main screen instance onto the UI stack for rendering. pushScreen(new TipCalcMainScreen()); }