Fred Daoud

Subscribe to Fred Daoud: eMailAlertsEmail Alerts
Get Fred Daoud: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Top Stories by Fred Daoud

In this article I discuss which displayable components are available in J2ME and explain how commands are associated with them. In particular, I examine how to create commands, add them to displayables, and define command behavior in CommandListeners. I then demonstrate how the resulting code is typically procedural and quickly becomes cluttered when too many commands are created. Using object-oriented principles and the Command pattern, I present two new classes that provide a simple solution to this problem. These classes provide structure and reusability to the process of creating commands for displayables, resulting in code that's cleaner and easier to maintain. Overview of Displayable Components In the Mobile Information Device Profile (MIDP) there's no AWT (and certainly no Swing) for creating graphical user interfaces. Instead, GUIs are created using classes fro... (more)