站内搜索: 请输入搜索关键词
当前页面: 图书首页 > Wireless Java Developing with J2ME, Second Edition

Summary - Wireless Java Developing with J2ME, Second Edition

Previous Section Next Section

Summary

We've covered a lot of ground in this chapter. The Canvas class provides a low-level interface for games or other demanding applications. You can draw shapes, text, and images on a Canvas using the Graphics class. Furthermore, you can receive detailed input information about key and pointer events. Game actions are a simple generalized input method based on key events. Finally, you should understand the multithreading issues with repainting and event callbacks. Lengthy processing should be placed in a separate thread so that it doesn't bring the system-owned user-interface thread to a grinding halt. Animations can use Display's callSerially() method to synchronize with the user-interface thread, although more commonly they will be implemented using a separate animation thread. The next chapter details MIDP 2.0's new Game API.


Previous Section Next Section