<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.developer.nokia.com/Community/Wiki/skins/common/feed.css?1917"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;feed=atom&amp;action=history</id>
		<title>Como desenvolver um jogo em Java ME - Parte 2 - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;action=history"/>
		<updated>2013-06-19T05:34:37Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.18.6</generator>

	<entry>
		<id>http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;diff=116932&amp;oldid=prev</id>
		<title>Hamishwillee: Hamishwillee - Bot addition of Template:ArticleMetaData</title>
		<link rel="alternate" type="text/html" href="http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;diff=116932&amp;oldid=prev"/>
				<updated>2011-11-10T04:26:13Z</updated>
		
		<summary type="html">&lt;p&gt;Hamishwillee - Bot addition of Template:ArticleMetaData&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 04:26, 10 November 2011&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:Java ME]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;{{ArticleMetaData&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|sourcecode= &amp;lt;!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] --&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|installfile= &amp;lt;!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) --&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|devices= &amp;lt;!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') --&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|sdk= &amp;lt;!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) --&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|platform= &amp;lt;!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later --&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|devicecompatability= &amp;lt;!-- Compatible devices e.g.: All* (must have internal GPS) --&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|dependencies= &amp;lt;!-- Any other/external dependencies e.g.: Google Maps Api v1.0 --&amp;gt; &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|signing=&amp;lt;!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer --&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|capabilities=&amp;lt;!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. --&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|keywords= &amp;lt;!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase --&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|id= &amp;lt;!-- Article Id (Knowledge base articles only) --&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|language=Lang-Portuguese&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|translated-by= &amp;lt;!-- [[User: XXXXX]] --&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|translated-from-title=&amp;lt;!-- Title only --&amp;gt; &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|translated-from-id= &amp;lt;!-- Id of translated revision --&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|review-by=&amp;lt;!-- After re-review: [[User:username]] --&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|review-timestamp=&amp;lt;!-- After re-review: YYYYMMDD --&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|update-by=&amp;lt;!-- After significant update: [[User:username]]--&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|update-timestamp=&amp;lt;!-- After significant update: YYYYMMDD --&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|creationdate=20071129&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|author=[[User:Dcrocha]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;}}&lt;/ins&gt;[[Category:Java ME]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Já que a interação com o usuário é uma das preocupações principais em qualquer aplicação móvel, devido ao tamanho das telas, é importante que você entenda o básico desta faceta dos MIDlets. Neste artigo, você aprenderá quais elementos de UI estão disponíveis em um MIDlet e como usá-los para criar a interface para o nosso clone do jogo Arkanoid.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Já que a interação com o usuário é uma das preocupações principais em qualquer aplicação móvel, devido ao tamanho das telas, é importante que você entenda o básico desta faceta dos MIDlets. Neste artigo, você aprenderá quais elementos de UI estão disponíveis em um MIDlet e como usá-los para criar a interface para o nosso clone do jogo Arkanoid.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wiki:diff:version:1.11a:oldid:106799:newid:116932 --&gt;
&lt;/table&gt;</summary>
		<author><name>Hamishwillee</name></author>	</entry>

	<entry>
		<id>http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;diff=106799&amp;oldid=prev</id>
		<title>Hamishwillee: Hamishwillee - Fix categories</title>
		<link rel="alternate" type="text/html" href="http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;diff=106799&amp;oldid=prev"/>
				<updated>2011-07-14T10:39:07Z</updated>
		
		<summary type="html">&lt;p&gt;Hamishwillee - Fix categories&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 10:39, 14 July 2011&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Java ME]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Já que a interação com o usuário é uma das preocupações principais em qualquer aplicação móvel, devido ao tamanho das telas, é importante que você entenda o básico desta faceta dos MIDlets. Neste artigo, você aprenderá quais elementos de UI estão disponíveis em um MIDlet e como usá-los para criar a interface para o nosso clone do jogo Arkanoid.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Já que a interação com o usuário é uma das preocupações principais em qualquer aplicação móvel, devido ao tamanho das telas, é importante que você entenda o básico desta faceta dos MIDlets. Neste artigo, você aprenderá quais elementos de UI estão disponíveis em um MIDlet e como usá-los para criar a interface para o nosso clone do jogo Arkanoid.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 286:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 287:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*[http://sergioestevao.com/midp/files/2009/04/formacao2.jar Jar File]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*[http://sergioestevao.com/midp/files/2009/04/formacao2.jar Jar File]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[Category:Java ME_(Português)]]&lt;/del&gt;[[Category:Code Examples]][[Category:Lang-Portuguese]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:Code Examples]][[Category:Lang-Portuguese]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Hamishwillee</name></author>	</entry>

	<entry>
		<id>http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;diff=106137&amp;oldid=prev</id>
		<title>Hamishwillee: Hamishwillee - Automated change of category from Lang-PT to Unlikely Category. (Moving)</title>
		<link rel="alternate" type="text/html" href="http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;diff=106137&amp;oldid=prev"/>
				<updated>2011-07-14T05:19:09Z</updated>
		
		<summary type="html">&lt;p&gt;Hamishwillee - Automated change of category from Lang-PT to Unlikely Category. (Moving)&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 05:19, 14 July 2011&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 286:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 286:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*[http://sergioestevao.com/midp/files/2009/04/formacao2.jar Jar File]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*[http://sergioestevao.com/midp/files/2009/04/formacao2.jar Jar File]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:Java ME_(Português)]][[Category:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Exemplos de código Java ME&lt;/del&gt;]][[Category:Lang-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;PT&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:Java ME_(Português)]][[Category:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Code Examples&lt;/ins&gt;]][[Category:Lang-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Portuguese&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Hamishwillee</name></author>	</entry>

	<entry>
		<id>http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;diff=96484&amp;oldid=prev</id>
		<title>Kiran10182 at 13:05, 27 May 2011</title>
		<link rel="alternate" type="text/html" href="http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;diff=96484&amp;oldid=prev"/>
				<updated>2011-05-27T13:05:45Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 13:05, 27 May 2011&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 282:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 282:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;strong&amp;gt;Downloads:&amp;lt;/strong&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;strong&amp;gt;Downloads:&amp;lt;/strong&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*[http://sergioestevao.com/midp/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;wp-content/uploads&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2007&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;11&lt;/del&gt;/lesson2-source.rar Full Source Code]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*[http://sergioestevao.com/midp/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;files&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;2009&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;04&lt;/ins&gt;/lesson2-source.rar Full Source Code]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*[http://sergioestevao.com/midp/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;wp-content/uploads&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2007&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;11&lt;/del&gt;/formacao2.jad Jad File]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*[http://sergioestevao.com/midp/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;files&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;2009&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;04&lt;/ins&gt;/formacao2.jad Jad File]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*[http://sergioestevao.com/midp/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;wp-content/uploads&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2007&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;11&lt;/del&gt;/formacao2.jar Jar File]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*[http://sergioestevao.com/midp/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;files&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;2009&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;04&lt;/ins&gt;/formacao2.jar Jar File]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:Java ME_(Português)]][[Category:Exemplos de código Java ME]][[Category:Lang-PT]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:Java ME_(Português)]][[Category:Exemplos de código Java ME]][[Category:Lang-PT]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kiran10182</name></author>	</entry>

	<entry>
		<id>http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;diff=19938&amp;oldid=prev</id>
		<title>Dcrocha at 19:41, 29 November 2007</title>
		<link rel="alternate" type="text/html" href="http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;diff=19938&amp;oldid=prev"/>
				<updated>2007-11-29T19:41:10Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 19:41, 29 November 2007&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 96:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 96:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Exemplos de interface gráfica ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Exemplos de interface gráfica ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;In order to learn how to use all these classes let’s create &lt;/del&gt;a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;simple &lt;/del&gt;interface &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;for our &lt;/del&gt;Arkanoid &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;game&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;We will implement the following screens&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Para aprender &lt;/ins&gt;a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;usar todas essas classes, vamos criar uma &lt;/ins&gt;interface &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;simples para o nosso jogo &lt;/ins&gt;Arkanoid. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Implementaremos as seguintes telas&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:UI-Exercise-GameInteface.png]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:UI-Exercise-GameInteface.png]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;For each of these game screens we are going to create a &lt;/del&gt;init[ScreenName] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;method that will inicialize the screen and returns the created &lt;/del&gt;Displayable &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;element&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Para cada uma das telas criaremos um método &lt;/ins&gt;init[ScreenName] &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;que inicializará cada uma das telas e retornará o elemento &lt;/ins&gt;Displayable &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;criado&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;=&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Usaremos o componente List para mostrar as opções principais; veja o código abaixo:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;For the Main Menu we will use the List component to show the main options, check the code bellow:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code java&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code java&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;public Displayable initMainForm() {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;public Displayable initMainForm() {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 126:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 127:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;For the settings &lt;/del&gt;menu &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;we choose a &lt;/del&gt;Form &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;element where we added a Choice Group for Sound Options &lt;/del&gt;( On-Off)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Para o &lt;/ins&gt;menu &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;de configurações escolhemos um elemento &lt;/ins&gt;Form &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;onde adicionamos um ChoiceGroup para opções de Som &lt;/ins&gt;(On-Off)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code java&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code java&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;public Displayable initSettingsForm() {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;public Displayable initSettingsForm() {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 145:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 147:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;For the help screen we choosed &lt;/del&gt;a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;simple &lt;/del&gt;Form &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; with an static message&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Para &lt;/ins&gt;a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tela de ajuda escolhemos um simples &lt;/ins&gt;Form &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;com uma mensagem estática&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code java&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code java&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;public Displayable initHelpForm() {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;public Displayable initHelpForm() {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 160:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 163:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;To introduce a new &lt;/del&gt;high score &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;we are going to use a &lt;/del&gt;Form &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;with an &lt;/del&gt;TextField &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and a &lt;/del&gt;Date Field:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Para introduzir um novo &lt;/ins&gt;high score &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;usaremos um &lt;/ins&gt;Form &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;com um &lt;/ins&gt;TextField &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;e um &lt;/ins&gt;Date Field:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code java&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code java&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 187:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 190:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;We are going to leave the game screen for the next lesson but at the moment let's create &lt;/del&gt;a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;method that emulates the end of the game and use it instead.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Deixaremos &lt;/ins&gt;a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tela de jogo para a próxima lição, mas no momento vamos criar um método que simula o final do jogo e usá-lo:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code java&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code java&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 207:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 210:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Now that we have all our screens created we need to link them in the &lt;/del&gt;commandAction &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;method&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Let's rewrite our code&lt;/del&gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Agora que temos todas as nossas telas, precisamos ligá-las ao método &lt;/ins&gt;commandAction&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;()&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Vamos reescrever nosso código&lt;/ins&gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code java&amp;gt; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code java&amp;gt; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 266:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 269:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Inside the commandAction you specify all the &lt;/del&gt;menu &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;logic for our &lt;/del&gt;midlet, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;deciding what to do next depending of what display is being showed and what Command was selected&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Dentro do método commmandAction() você especifica toda a lógica do &lt;/ins&gt;menu &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;para nosso &lt;/ins&gt;midlet, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;decidindo o que fazer dependendo de qual displayable está sendo mostrado e de qual comando foi selecionado&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;A partir do &lt;/ins&gt;menu &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;principal simplesmente redirecionamos o usuário para cada tela específica&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Para as outras telas&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;temos apenas um comando&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;Back&amp;quot;, por enquanto&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;A única exceção é &lt;/ins&gt;a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tela NewHighScores onde um comando &amp;quot;Save&amp;quot; guarda os high &lt;/ins&gt;scores &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;em um vetor&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;From the main &lt;/del&gt;menu &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;we simple redirect the user for each specific screen&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;For the other screens&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;at the moment&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;we only have an&amp;#160; back command&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The only exception is the NewHighScores form where &lt;/del&gt;a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;save command already stores the information to an &lt;/del&gt;scores &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;array&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;You may have noticed the use of an the &lt;/del&gt;display() &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;method&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;this is a simple &lt;/del&gt;helper &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;method to active an &lt;/del&gt;Displayable.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Você pode ter notado o uso do método &lt;/ins&gt;display(), &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;que é apenas um simples &lt;/ins&gt;helper &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;para ativar um &lt;/ins&gt;Displayable.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code java&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code java&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;public void display(Displayable display) {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;public void display(Displayable display) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 277:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 279:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Noe just run you &lt;/del&gt;midlet &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and finally you can enjoy your first Game Interface! Next lesson we are going to implement the &lt;/del&gt;Game Screen&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, see you soon&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Agora rode seu &lt;/ins&gt;midlet &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;e finalmente você terá sua primeira interface gráfica. Na próxima lição, implementaremos a tela &lt;/ins&gt;Game Screen. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;strong&amp;gt;Downloads:&amp;lt;/strong&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;strong&amp;gt;Downloads:&amp;lt;/strong&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 284:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 286:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*[http://sergioestevao.com/midp/wp-content/uploads/2007/11/formacao2.jar Jar File]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;*[http://sergioestevao.com/midp/wp-content/uploads/2007/11/formacao2.jar Jar File]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:Java]][[Category:Java ME]][[Category:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Games]][[Category:How To]][[Category:Code Examples&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:Java &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ME_(Português)&lt;/ins&gt;]][[Category:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Exemplos de código &lt;/ins&gt;Java ME]][[Category:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Lang-PT&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dcrocha</name></author>	</entry>

	<entry>
		<id>http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;diff=19937&amp;oldid=prev</id>
		<title>Dcrocha at 19:30, 29 November 2007</title>
		<link rel="alternate" type="text/html" href="http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;diff=19937&amp;oldid=prev"/>
				<updated>2007-11-29T19:30:53Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 19:30, 29 November 2007&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 86:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 86:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Existem oito tipos de Item que podem ser adicionados a um Form:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Existem oito tipos de Item que podem ser adicionados a um Form:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;There are eight Item types that can be added to a form.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;strong&amp;gt;StringItem&amp;lt;/strong&amp;gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;um rótulo que não pode ser modificado pelo usuário&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Este &lt;/ins&gt;item &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pode conter um título e texto&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;e ambos podem ser nulos para marcar o local como um &lt;/ins&gt;placeholder. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;A classe &lt;/ins&gt;Form &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;provê um atalho para se adicionar um &lt;/ins&gt;StringItem &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;sem título&lt;/ins&gt;: append(String text)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;strong&amp;gt;StringItem&amp;lt;/strong&amp;gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;a label that cannot be modified by the user&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This &lt;/del&gt;item &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;may contain a title and text&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;both of which may be null to allow it to act as a &lt;/del&gt;placeholder. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The &lt;/del&gt;Form &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;class provides a shortcut for adding a &lt;/del&gt;StringItem&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, without a title&lt;/del&gt;: append(String text)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;strong&amp;gt;DateField&amp;lt;/strong&amp;gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;permite que o usuário entre valores de dados e tempo em um dos três formatos&lt;/ins&gt;: DATE, TIME, or DATE_TIME.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;strong&amp;gt;DateField&amp;lt;/strong&amp;gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;allows the user to enter date/time in one of three formats&lt;/del&gt;: DATE, TIME, or DATE_TIME.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;strong&amp;gt;TextField&amp;lt;/strong&amp;gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;o mesmo que um &lt;/ins&gt;TextBox.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;strong&amp;gt;TextField&amp;lt;/strong&amp;gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;same as a &lt;/del&gt;TextBox.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;strong&amp;gt;ChoiceGroup&amp;lt;/strong&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;o mesmo que uma &lt;/ins&gt;List.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;strong&amp;gt;ChoiceGroup&amp;lt;/strong&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;same as a &lt;/del&gt;List.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;strong&amp;gt;Spacer&amp;lt;/strong&amp;gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;usado para posicionar elementos de &lt;/ins&gt;UI &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;através da colocação de alguns espaços entre eles&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Este elemento é invisível e pode ter seu tamanho definido para qualquer valor&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;strong&amp;gt;Spacer&amp;lt;/strong&amp;gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;used for positioning &lt;/del&gt;UI &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;elements by putting some space between them&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This element is an invisible UI element and can be set to a particular size&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;strong&amp;gt;Gauge&amp;lt;/strong&amp;gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;é usado para simular uma barra de progresso&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Entretanto&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;esta barra de progresso também pode ser usada de modo interativo pelo usuário&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;por exemplo como um controle de &lt;/ins&gt;volume.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;strong&amp;gt;Gauge&amp;lt;/strong&amp;gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;a gauge is used to simulate a progress bar&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;However&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;this progress bar look can also be used in an interactive mode by the user. For example&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;if you wanted to show the user a &lt;/del&gt;volume &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;control, a gauge would be used to show an interactive knob&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;strong&amp;gt;ImageItem&amp;lt;/strong&amp;gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;um &lt;/ins&gt;item &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;que possui uma imagem. Como o &lt;/ins&gt;StringItem, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;a classe &lt;/ins&gt;Form &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;também fornece um atalho para adicionar uma imagem:&lt;/ins&gt;: append(Image image). &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Mais sobre imagem em uma seção posterior&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;strong&amp;gt;ImageItem&amp;lt;/strong&amp;gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;an &lt;/del&gt;item &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;that holds an image! Like the &lt;/del&gt;StringItem, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the &lt;/del&gt;Form &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;class provides a shortcut method for adding an image&lt;/del&gt;: append(Image image). &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;More about images in a later section&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;strong&amp;gt;CustomItem&amp;lt;/strong&amp;gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;é uma classe abstrata que permite a criação de &lt;/ins&gt;subclasses &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;de Item que tenha sua própria aparência customizável&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;assim como sua interatividade e mecanismos de notificação&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Se você deseja um componente gráfico que seja muito diferente dos elementos fornecidos por padrão&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;você pode criar um &lt;/ins&gt;CustomItem &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;e adicioná-lo &lt;/ins&gt;a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;um Form&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* &amp;lt;strong&amp;gt;CustomItem&amp;lt;/strong&amp;gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;it's an abstract class that allows the creation of &lt;/del&gt;subclasses &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;that have their own appearances&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;their own interactivity, and their own notification mechanisms&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;If you require a UI element that is different from the supplied elements&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;you can subclass &lt;/del&gt;CustomItem &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to create it for addition to &lt;/del&gt;a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;form&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;User Interface Examples &lt;/del&gt;===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Exemplos de interface gráfica &lt;/ins&gt;===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In order to learn how to use all these classes let’s create a simple interface for our Arkanoid game. We will implement the following screens:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;In order to learn how to use all these classes let’s create a simple interface for our Arkanoid game. We will implement the following screens:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dcrocha</name></author>	</entry>

	<entry>
		<id>http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;diff=19936&amp;oldid=prev</id>
		<title>Dcrocha at 19:22, 29 November 2007</title>
		<link rel="alternate" type="text/html" href="http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;diff=19936&amp;oldid=prev"/>
				<updated>2007-11-29T19:22:25Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 19:22, 29 November 2007&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 82:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 82:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Form ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Form ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;A &lt;/del&gt;Form &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is a &lt;/del&gt;Screen &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;that contains an arbitrary mixture of items&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;In general&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;any subclass of the &lt;/del&gt;Item &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;class may be contained within a form&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The implementation handles &lt;/del&gt;layout, traversal&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, and &lt;/del&gt;scrolling. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The entire contents of the Form scrolls together&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Um &lt;/ins&gt;Form &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;é uma &lt;/ins&gt;Screen &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;que contém uma mistura arbitrária de itens&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Em geral&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;qualquer subclasse da classe &lt;/ins&gt;Item &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pode estar contida dentro de um Form&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;A implementação ajusta o &lt;/ins&gt;layout, traversal &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;e &lt;/ins&gt;scrolling. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Todo o conteúdo de um form é rolado (scrolled) de forma conjunta&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Existem oito tipos de Item que podem ser adicionados a um Form:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;There are eight Item types that can be added to a form.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;There are eight Item types that can be added to a form.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dcrocha</name></author>	</entry>

	<entry>
		<id>http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;diff=19935&amp;oldid=prev</id>
		<title>Dcrocha: New page: Já que a interação com o usuário é uma das preocupações principais em qualquer aplicação móvel, devido ao tamanho das telas, é importante que você entenda o básico desta facet...</title>
		<link rel="alternate" type="text/html" href="http://www.developer.nokia.com/Community/Wiki/index.php?title=Como_desenvolver_um_jogo_em_Java_ME_-_Parte_2&amp;diff=19935&amp;oldid=prev"/>
				<updated>2007-11-29T19:19:27Z</updated>
		
		<summary type="html">&lt;p&gt;New page: Já que a interação com o usuário é uma das preocupações principais em qualquer aplicação móvel, devido ao tamanho das telas, é importante que você entenda o básico desta facet...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Já que a interação com o usuário é uma das preocupações principais em qualquer aplicação móvel, devido ao tamanho das telas, é importante que você entenda o básico desta faceta dos MIDlets. Neste artigo, você aprenderá quais elementos de UI estão disponíveis em um MIDlet e como usá-los para criar a interface para o nosso clone do jogo Arkanoid.&lt;br /&gt;
&lt;br /&gt;
Qualquer interação com um usuário é feita através de um componente de UI. De fato, quando você criou o simples &amp;quot;Hello World&amp;quot; na parte 1 deste artigo, você usou um elemento chamado Alert para mostrar uma mensagem na tela. Esta mensagem foi mostrada na tela na realidade com a ajuda de outro elemento de UI chamado Display.&lt;br /&gt;
&lt;br /&gt;
Vamos iniciar com uma discussão da arquitetura completa dos componentes gráficos.&lt;br /&gt;
&lt;br /&gt;
== Arquitetura ==&lt;br /&gt;
&lt;br /&gt;
O MIDP 2.0 fornece classes gráficas em um pacote, javax.microedition.lcdui. Se você está se perguntando o que &amp;quot;LCDUI&amp;quot; significa, a resposta é &amp;quot;Liquid Crystal Display User Interface (LCD UI)&amp;quot;. Para que você possa mostrar um elemento gráfico na tela, você precisa usar uma classe que implemente a interface &amp;lt;tt&amp;gt;Displayable&amp;lt;/tt&amp;gt;. Tal classe pode ter um título, um ticker e certos comandos associados a si, entre outras características.&lt;br /&gt;
&lt;br /&gt;
A classe Display gerencia o que está sendo mostrado na tela. O método estático getDisplay(MIDlet midlet) lhe fornece acesso ao Display do seu midlet. Assim você pode usar o método setCurrent(Displayable d) para escolher o que mostrar na tela em dado momento. VOcê pode ter apenas um Displayable sendo mostrado de cada vez. Lembra-se do código de nossa última lição?&lt;br /&gt;
&amp;lt;code java&amp;gt;&lt;br /&gt;
Display.getDisplay(this).setCurrent(alert);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As classes Displayable do MIDP 2.0 pacote javax.microedition.lcdui podem ser divididas em dois grupos: as de alto nível e as de baixo nível.&lt;br /&gt;
&lt;br /&gt;
O grupo de alto nível é implementado através da classe Screen, e o de baixo nível através da classe Canvas; ambas essas classes e suas subclasses implementam a interface Displayable, como pode ser visto na figura abaixo:&lt;br /&gt;
&lt;br /&gt;
[[Image:UI-Displayable-Classes.png]]&lt;br /&gt;
&lt;br /&gt;
== Interface de alto nível ==&lt;br /&gt;
&lt;br /&gt;
As classes do grupo de alto nível são perfeitas para o desenvolvimento de MIDlets que devem rodar no maior número de devices possível, pois as mesmas não fornecem controle exato sobre o modo com o qual são mostrada. Ao contrário, elas são altamente abstratas, para permitir que o dispositivo em si gerencie a melhor forma de mostrá-las na tela, de acordo com suas capacidades de hardware. Abaixo você pode ver um diagrama de classes das mesmas:&lt;br /&gt;
&lt;br /&gt;
[[Image:UI-HighLevel-Elements.png]]&lt;br /&gt;
&lt;br /&gt;
Como você pode ver, existem várias classes que fornecem elementos gráficos, então vamos analisar cada uma delas.&lt;br /&gt;
&lt;br /&gt;
=== Command ===&lt;br /&gt;
&lt;br /&gt;
Um MIDlet interage com o usuário através de comandos. Um comando é o equivalente a um item de menu em uma aplicação desktop, e pode somente ser associado a um único elemento de UI. A classe Displayable permite que o usuário adicione um comando a ela utilizando o método addCommand(Command command). Um elemento Displayable pode ter múltiplos comandos associados a si.&lt;br /&gt;
&lt;br /&gt;
A classe Command contém informações sobre um comando. Esta informação é encapsulada em quatro propriedades, a saber: um label curto, um longo, um tipo de comando, e uma prioridade. Em nossa aplicação &amp;quot;HelloWorld&amp;quot; criamos um comando fornecendo esses valores no seu construtor:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code java&amp;gt;&lt;br /&gt;
// adds a command to exit the Midlet&lt;br /&gt;
comExit = new Command(&amp;quot;Exit&amp;quot;, Command.EXIT, 1);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note que comandos são imutáveis, uma vez criados.&lt;br /&gt;
&lt;br /&gt;
Especificar um tipo de comando permite que o device rodando o MIDlet mapeie quaisquer teclas predefinidas no device àquele comando. Por exemplo, um comando cujo tipo seja &amp;quot;OK&amp;quot; será mapeado à tecla &amp;quot;OK&amp;quot;do aparelho. Os outros tipos são: BACK, CANCEL, EXIT, HELP, ITEM, SCREEN e STOP. O tipo SCREEN relaciona-se com um comando definido para aplicação para a tela atual. Tanto SCREEN quanto ITEM provavelmente nunca serão mapeados a uma tecla específica do aparelho, mas sim apenas quando estiverem em destaque.&lt;br /&gt;
&lt;br /&gt;
Para receber feedback do acionamento dos comandos, seu midlet precisa implementar a interface CommandListener, e o método commandAction(). Já fizemos isso em nosso midlet HelloWorld:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code java&amp;gt;&lt;br /&gt;
alert.addCommand(comExit);&lt;br /&gt;
// adds a listener to the form &lt;br /&gt;
alert.setCommandListener(this);&lt;br /&gt;
[...]&lt;br /&gt;
public void commandAction(Command cmd, Displayable display) {&lt;br /&gt;
  if (cmd == comExit) {&lt;br /&gt;
    exit();&lt;br /&gt;
  }		&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Como você pode ver, o método commandAction() recebe dois parâmetros: o Comando sendo executado e o Displayable atualmente sendo mostrado na tela.&lt;br /&gt;
&lt;br /&gt;
=== Alert ===&lt;br /&gt;
&lt;br /&gt;
Como você se lembra, utilizamos um alerta em nosso midlet Hello World; este elemento representa uma tela que mostra alguma mensagem ao usuário e aguarda um período de tempo antes de proceder para o próximo Displayable. Um alerta pode conter uma string de texto, um título e uma imagem. O uso ideal de um Alert é para informar ao usuário sobre erros ou alguma condição excepcional.&lt;br /&gt;
&lt;br /&gt;
=== TextBox ===&lt;br /&gt;
&lt;br /&gt;
A classe TextBox é uma Screen que permite ao usuário entrar e editar texto. Este elemento pode ser adaptado para suas necessidades especiais. Você pode restringir o número máximo de caracteres que o usuário pode digitar , e também o tipo de texto que é aceito. Existem seis flags para restringir o conteúdo: ANY, EMAILADDR, NUMERIC, PHONENUMBER, URL, and DECIMAL. ANY permite todos os tipos de texto, enquanto as outras flags atuam de acordo com seus nomes.&lt;br /&gt;
&lt;br /&gt;
De maneira similar, existem seis flags que afetam o display em si. Estas são: PASSWORD, UNEDITABLE, SENSITIVE, NON_PREDICTIVE, INITIAL_CAPS_WORD, and INITIAL_CAPS_SENTENCE. &lt;br /&gt;
Por exemplo, para aceitar apenas endereços de e-mail em um textbox, você precisa definir a flag TextField.EMAILADDR usando o método setConstraints(). Para fazer este campo de texto ser apenas de leitura, você precisa combinar a flag com TextField.UNEDITABLE. Isto é feito utilizando-se uma operação bitwise OR entre as duas, como se segue: setConstraints(TextField.EMAILADDR | TextField.UNEDITABLE);.&lt;br /&gt;
&lt;br /&gt;
Para definir o conteúdo de um textbox, você pode usar o médoto setString() para definir o conteúdo completo, ou insert() para inserir mais texto em adição ao que já está digitado. A listagem mais abaixo (a terceira) mostra como usar ambos os métodos:&lt;br /&gt;
&lt;br /&gt;
=== List ===&lt;br /&gt;
&lt;br /&gt;
Uma lista contém um conjunto de escolhas. Quando uma lista está presente no Display, o usuário pode interagir com a mesma selecionando elementos e rolando através deles. A lista pode ser configurada para ser:&lt;br /&gt;
&lt;br /&gt;
* Choice.EXCLUSIVE - apenas um elemento pode ser selecionado&lt;br /&gt;
* Choice.MULTIPLE - múltiplos elementos podem ser selecionados&lt;br /&gt;
* Choice.IMPLICIT - o elemento em destaque é automaticamente selecionado&lt;br /&gt;
&lt;br /&gt;
=== Form ===&lt;br /&gt;
&lt;br /&gt;
A Form is a Screen that contains an arbitrary mixture of items. In general, any subclass of the Item class may be contained within a form. The implementation handles layout, traversal, and scrolling. The entire contents of the Form scrolls together.&lt;br /&gt;
&lt;br /&gt;
There are eight Item types that can be added to a form.&lt;br /&gt;
* &amp;lt;strong&amp;gt;StringItem&amp;lt;/strong&amp;gt;, a label that cannot be modified by the user. This item may contain a title and text, both of which may be null to allow it to act as a placeholder. The Form class provides a shortcut for adding a StringItem, without a title: append(String text)&lt;br /&gt;
* &amp;lt;strong&amp;gt;DateField&amp;lt;/strong&amp;gt;, allows the user to enter date/time in one of three formats: DATE, TIME, or DATE_TIME.&lt;br /&gt;
* &amp;lt;strong&amp;gt;TextField&amp;lt;/strong&amp;gt;, same as a TextBox.&lt;br /&gt;
* &amp;lt;strong&amp;gt;ChoiceGroup&amp;lt;/strong&amp;gt; same as a List.&lt;br /&gt;
* &amp;lt;strong&amp;gt;Spacer&amp;lt;/strong&amp;gt;, used for positioning UI elements by putting some space between them. This element is an invisible UI element and can be set to a particular size.&lt;br /&gt;
* &amp;lt;strong&amp;gt;Gauge&amp;lt;/strong&amp;gt;, a gauge is used to simulate a progress bar. However, this progress bar look can also be used in an interactive mode by the user. For example, if you wanted to show the user a volume control, a gauge would be used to show an interactive knob.&lt;br /&gt;
* &amp;lt;strong&amp;gt;ImageItem&amp;lt;/strong&amp;gt;, an item that holds an image! Like the StringItem, the Form class provides a shortcut method for adding an image: append(Image image). More about images in a later section.&lt;br /&gt;
* &amp;lt;strong&amp;gt;CustomItem&amp;lt;/strong&amp;gt;, it's an abstract class that allows the creation of subclasses that have their own appearances, their own interactivity, and their own notification mechanisms. If you require a UI element that is different from the supplied elements, you can subclass CustomItem to create it for addition to a form.&lt;br /&gt;
&lt;br /&gt;
=== User Interface Examples ===&lt;br /&gt;
In order to learn how to use all these classes let’s create a simple interface for our Arkanoid game. We will implement the following screens:&lt;br /&gt;
&lt;br /&gt;
[[Image:UI-Exercise-GameInteface.png]]&lt;br /&gt;
&lt;br /&gt;
For each of these game screens we are going to create a init[ScreenName] method that will inicialize the screen and returns the created Displayable element.&lt;br /&gt;
&lt;br /&gt;
For the Main Menu we will use the List component to show the main options, check the code bellow:&lt;br /&gt;
&amp;lt;code java&amp;gt;&lt;br /&gt;
public Displayable initMainForm() {&lt;br /&gt;
  if (mainForm == null) {&lt;br /&gt;
    // creates a implicit List where the   current element is&lt;br /&gt;
    // the selected&lt;br /&gt;
    mainForm = new List(&amp;quot;Menu&amp;quot;,   List.IMPLICIT);&lt;br /&gt;
    // append list options&lt;br /&gt;
    mainForm.append(&amp;quot;New Game&amp;quot;,   null);&lt;br /&gt;
    mainForm.append(&amp;quot;Options&amp;quot;,   null);&lt;br /&gt;
    mainForm.append(&amp;quot;Scores&amp;quot;,   null);&lt;br /&gt;
    mainForm.append(&amp;quot;Help&amp;quot;, null);&lt;br /&gt;
    mainForm.append(&amp;quot;Exit&amp;quot;, null);&lt;br /&gt;
&lt;br /&gt;
    // adds a select Command&lt;br /&gt;
    comSelect = new   Command(&amp;quot;Select&amp;quot;, Command.ITEM, 1);&lt;br /&gt;
    mainForm.setSelectCommand(comSelect);&lt;br /&gt;
&lt;br /&gt;
    // adds a listener to the form &lt;br /&gt;
    mainForm.setCommandListener(this);&lt;br /&gt;
  }&lt;br /&gt;
    return mainForm;  &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For the settings menu we choose a Form element where we added a Choice Group for Sound Options ( On-Off)&lt;br /&gt;
&amp;lt;code java&amp;gt;&lt;br /&gt;
public Displayable initSettingsForm() {&lt;br /&gt;
  // check if already created&lt;br /&gt;
  if (settingsForm == null) {&lt;br /&gt;
    settingsForm = new Form(&amp;quot;Settings&amp;quot;);&lt;br /&gt;
    settingsForm.addCommand(initBackCommand());&lt;br /&gt;
    settingsForm.setCommandListener(this);&lt;br /&gt;
    // creates a choice Group for sound options&lt;br /&gt;
    soundChoice = new ChoiceGroup(&amp;quot;Sound&amp;quot;, List.EXCLUSIVE);      &lt;br /&gt;
    soundChoice.append(&amp;quot;On&amp;quot;, null);&lt;br /&gt;
    soundChoice.append(&amp;quot;Off&amp;quot;, null);&lt;br /&gt;
    // appends the choice to the form&lt;br /&gt;
    settingsForm.append(soundChoice);      &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  return settingsForm;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For the help screen we choosed a simple Form  with an static message:&lt;br /&gt;
&amp;lt;code java&amp;gt;&lt;br /&gt;
public Displayable initHelpForm() {&lt;br /&gt;
    if (helpForm == null) {&lt;br /&gt;
      helpForm = new Form(&amp;quot;Help&amp;quot;);&lt;br /&gt;
      helpForm&lt;br /&gt;
          .append(&amp;quot;User cursors to move your pad, don't let &amp;quot;+&lt;br /&gt;
              &amp;quot;the ball go by you, hit all the bricks!&amp;quot;);&lt;br /&gt;
      helpForm.setCommandListener(this);&lt;br /&gt;
      helpForm.addCommand(initBackCommand());&lt;br /&gt;
    }&lt;br /&gt;
    return helpForm;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To introduce a new high score we are going to use a Form with an TextField and a Date Field:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code java&amp;gt;&lt;br /&gt;
public Displayable initNewHighScore(int score, int pos) {&lt;br /&gt;
    if (newHighScoreForm == null) {&lt;br /&gt;
      newHighScoreForm = new Form(&amp;quot;New High Score&amp;quot;);&lt;br /&gt;
      newHighScoreForm.setCommandListener(this);&lt;br /&gt;
      // create items&lt;br /&gt;
      highScoreName = new TextField(&amp;quot;Name&amp;quot;, &amp;quot;&amp;quot;, 20, TextField.ANY);&lt;br /&gt;
      highScoreValue = new StringItem(&amp;quot;Score&amp;quot;, Integer.toString(score));&lt;br /&gt;
      highScorePosition = new StringItem(&amp;quot;Position&amp;quot;, Integer.toString(pos));&lt;br /&gt;
      // create save command&lt;br /&gt;
      highScoreSave = new Command(&amp;quot;Save&amp;quot;, Command.OK, 1);      &lt;br /&gt;
      // append command and itens to screen&lt;br /&gt;
      newHighScoreForm.addCommand(highScoreSave);&lt;br /&gt;
      newHighScoreForm.append(highScoreName);&lt;br /&gt;
      newHighScoreForm.append(highScoreValue);&lt;br /&gt;
      newHighScoreForm.append(highScorePosition);&lt;br /&gt;
    }&lt;br /&gt;
    // update score&lt;br /&gt;
    highScoreValue.setText(Integer.toString(score));&lt;br /&gt;
    // update pos&lt;br /&gt;
    highScorePosition.setText(Integer.toString(pos)+1);&lt;br /&gt;
    return newHighScoreForm;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We are going to leave the game screen for the next lesson but at the moment let's create a method that emulates the end of the game and use it instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code java&amp;gt;&lt;br /&gt;
  public void endGame(int lifes, int score, int time) {&lt;br /&gt;
    Displayable nextScreen = initMainForm();&lt;br /&gt;
    String message;&lt;br /&gt;
    if (lifes == 0) {&lt;br /&gt;
      message = &amp;quot;Game Over!!&amp;quot;;&lt;br /&gt;
    } else {&lt;br /&gt;
      message = &amp;quot;You Win!&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    int pos = isHighScore(score);&lt;br /&gt;
    if (pos != -1) {&lt;br /&gt;
      nextScreen = initNewHighScore(score, pos);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    display(new Alert(message, message, null, AlertType.INFO), nextScreen);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that we have all our screens created we need to link them in the commandAction method. Let's rewrite our code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code java&amp;gt; &lt;br /&gt;
public void commandAction(Command cmd, Displayable display) {&lt;br /&gt;
  // check what screen is being displayed&lt;br /&gt;
  if (display == mainForm) {&lt;br /&gt;
    // check what command was used&lt;br /&gt;
    if (cmd == comSelect) {&lt;br /&gt;
      switch (mainForm.getSelectedIndex()) {&lt;br /&gt;
      case (0):&lt;br /&gt;
        // At the moment just go directly to the end of the game&lt;br /&gt;
        endGame(1, 200, 50);&lt;br /&gt;
        break;&lt;br /&gt;
      case (1):&lt;br /&gt;
        display(initSettingsForm());&lt;br /&gt;
        break;&lt;br /&gt;
      case (2):&lt;br /&gt;
        display(initScoreForm());&lt;br /&gt;
        break;&lt;br /&gt;
      case (3):&lt;br /&gt;
        display(initHelpForm());&lt;br /&gt;
        break;&lt;br /&gt;
      case (4):&lt;br /&gt;
        exit();&lt;br /&gt;
        break;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  } else if (display == highScoreForm) {&lt;br /&gt;
    if (cmd == comBack) {&lt;br /&gt;
      display(initMainForm());&lt;br /&gt;
    }&lt;br /&gt;
  } else if (display == settingsForm) {&lt;br /&gt;
    if (cmd == comBack) {&lt;br /&gt;
      soundOn = soundChoice.getSelectedIndex() == 0;&lt;br /&gt;
      display(initMainForm());&lt;br /&gt;
    }&lt;br /&gt;
  } else if (display == helpForm) {&lt;br /&gt;
    if (cmd == comBack) {&lt;br /&gt;
      display(initMainForm());&lt;br /&gt;
    }&lt;br /&gt;
  } else if (display == newHighScoreForm) {&lt;br /&gt;
      if (cmd == highScoreSave) {&lt;br /&gt;
        int pos = Integer.parseInt(highScorePosition.getText())-1;&lt;br /&gt;
        // advance all the scores&lt;br /&gt;
        for ( int i = scores.length-1; i &amp;gt; pos ; i--){&lt;br /&gt;
          scores[i].name  = scores[i-1].name;&lt;br /&gt;
          scores[i].value = scores[i-1].value;&lt;br /&gt;
          scores[i].when  = scores[i-1].when;&lt;br /&gt;
        }&lt;br /&gt;
        // insert new score&lt;br /&gt;
        scores[pos].name = highScoreName.getString();&lt;br /&gt;
        scores[pos].value = Integer.parseInt(highScoreValue.getText());&lt;br /&gt;
        scores[pos].when = new Date();        &lt;br /&gt;
        display(initScoreForm());&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside the commandAction you specify all the menu logic for our midlet, deciding what to do next depending of what display is being showed and what Command was selected.&lt;br /&gt;
From the main menu we simple redirect the user for each specific screen. For the other screens, at the moment, we only have an  back command. The only exception is the NewHighScores form where a save command already stores the information to an scores array.&lt;br /&gt;
&lt;br /&gt;
You may have noticed the use of an the display() method, this is a simple helper method to active an Displayable.&lt;br /&gt;
&amp;lt;code java&amp;gt;&lt;br /&gt;
public void display(Displayable display) {&lt;br /&gt;
  // shows display  in the screen.&lt;br /&gt;
  Display.getDisplay(this).setCurrent(display);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Noe just run you midlet and finally you can enjoy your first Game Interface! Next lesson we are going to implement the Game Screen, see you soon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Downloads:&amp;lt;/strong&amp;gt;&lt;br /&gt;
*[http://sergioestevao.com/midp/wp-content/uploads/2007/11/lesson2-source.rar Full Source Code]&lt;br /&gt;
*[http://sergioestevao.com/midp/wp-content/uploads/2007/11/formacao2.jad Jad File]&lt;br /&gt;
*[http://sergioestevao.com/midp/wp-content/uploads/2007/11/formacao2.jar Jar File]&lt;br /&gt;
&lt;br /&gt;
[[Category:Java]][[Category:Java ME]][[Category:Games]][[Category:How To]][[Category:Code Examples]]&lt;/div&gt;</summary>
		<author><name>Dcrocha</name></author>	</entry>

	</feed>