O'Reilly logo

Java™ ME Game Programming, Second Edition by Ph.D. Martin J. Wells, Ph.D. John P. Flynt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding Code

To create a MIDlet, access the Starter_Code.txt file in the Chapter 6 code folder. To accomplish this, select File > Open File from the main menu of the NetBeans IDE. Navigate to the Chapter 6 HelloNetBeansMIDlet\src folder. Open the Starter_Code.txt file. This file is largely the same file you worked with in Chapter 5.

Now, working in the NetBeans editor, use Ctrl + A to select the contents of the Starter_Code.txt file. Press Ctrl + C to copy the contents. Then return to the HelloNetBeansMIDlet.java file and use Ctrl + V to paste the contents into it. When you finish, close the Starter_Code.txt file by clicking the x on the file tab at the top of the IDE edit area.

Note

As a precaution, do not try to copy a *.java file into the src ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required