<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Últimas mensagens do tópico "Erro no codigo."]]></title>
		<link>http://www.guj.com.br/posts/list/14.java</link>
		<description><![CDATA[Últimas mensagens enviadas no tópico "Erro no codigo."]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Erro no codigo.</title>
				<description><![CDATA[ Pessoal, estou começando a mexer com o java mobile e ai em baixo esta o meu primeiro codigo. <br /> Ambos feito no eclipse e no netbeans, porem, ambos estao com o mesmo erro. Já tentei colocar abstract mas <br /> ao aparecer a tela do emulador, nao aparece nada. Alguem poderia me dar um help?<br /> <br /> Obrigado!<br /> <br /> <br /> import javax.microedition.midlet.MIDlet;<br /> import javax.microedition.lcdui.Display;<br /> import javax.microedition.lcdui.TextBox;<br /> <br /> public class PrimeiraMID extends MIDlet {<br /> 	private Display Tdisplay;<br /> 	TextBox box = null;<br /> <br /> 	public PrimeiraMID() {<br /> <br /> 	}<br />        	public void stardApp(){<br /> 		Tdisplay = Display.getDisplay(this);<br /> 		box = new TextBox("Primeiro Exemplo","Hello World", 20, 0);<br /> 		Tdisplay.setCurrent(box);<br /> 	}<br /> 	public void pauseApp(){<br /> <br /> 	}<br /> 	public void destroyApp(boolean unconditional){<br /> <br /> 	}<br /> <br /> }<br /> <br /> <br /> C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\PrimeiraMid\src\PrimeiraMID.java:5: PrimeiraMID is not abstract and does not override abstract method startApp() in javax.microedition.midlet.MIDlet<br /> public class PrimeiraMID extends MIDlet {<br /> ]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/195403/981168/erro-no-codigo
</guid>
				<link>http://www.guj.com.br/prepost/195403/981168/erro-no-codigo
</link>
				<pubDate><![CDATA[Sun, 16 Nov 2008 14:59:26]]> GMT</pubDate>
				<author><![CDATA[ rhkwPJ]]></author>
			</item>
			<item>
				<title>Re:Erro no codigo.</title>
				<description><![CDATA[ Vc precisa declarar um método chamado startApp() pois MIDlet declara ele como abstrato!  <img src="http://www.guj.com.br/images/smilies/8a80c6485cd926be453217d59a84a888.gif" border="0"> ]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/195403/981176/reerro-no-codigo
</guid>
				<link>http://www.guj.com.br/prepost/195403/981176/reerro-no-codigo
</link>
				<pubDate><![CDATA[Tue, 18 Nov 2008 09:57:43]]> GMT</pubDate>
				<author><![CDATA[ fabiofalciPJ]]></author>
			</item>
			<item>
				<title>Re:Erro no codigo.</title>
				<description><![CDATA[ Ola' rhkw,<br /> <br /> Segue um exemplo de código que acredito que será grande ajuda. Esta aplicação apenas escreve "Hello World!"  na tela.<br /> <br /> [code]<br /> import javax.microedition.lcdui.Command;<br /> import javax.microedition.lcdui.CommandListener;<br /> import javax.microedition.lcdui.Display;<br /> import javax.microedition.lcdui.Displayable;<br /> import javax.microedition.lcdui.Form;<br /> import javax.microedition.midlet.MIDlet;<br /> import javax.microedition.midlet.MIDletStateChangeException;<br /> <br /> /**<br />  * This class is used to test basic execution of MIDLet HelloWorld.<br />  * <br />  * @author Alcides Flach<br />  * <br />  * @see javax.microedition.midlet.MIDlet<br />  */<br /> public class HelloWorld extends MIDlet implements CommandListener {<br /> <br /> 	private Display display;<br /> <br /> 	private Form form;<br /> <br /> 	private Command exit;<br /> <br /> 	/**<br /> 	 * Create an instance of the MIDlet HelloWorld.<br /> 	 */<br /> 	public HelloWorld() {<br /> 		// call the super class constructor		<br /> 		super();<br /> <br /> 		// create a command to finish the application<br /> 		exit = new Command("EXIT", Command.EXIT, 1);<br /> <br /> 		// create a form object<br /> 		form = new Form("J2ME Testing");<br /> <br /> 		// append the messege<br /> 		form.append("Hello World!");<br /> <br /> 		// add the command<br /> 		form.addCommand(exit);<br /> <br /> 		// set the form to listen the events<br /> 		form.setCommandListener(this);<br /> 	}<br /> <br /> 	protected void startApp() throws MIDletStateChangeException {<br /> 		// get the display instace of this MIDlet<br /> 		display = Display.getDisplay(this);<br /> <br /> 		// set the form object visible on the display<br /> 		display.setCurrent(form);<br /> 	}<br /> <br /> 	public void commandAction(Command c, Displayable d) {<br /> 		// verify if the command event is the exit command<br /> 		if (c == exit) {<br /> 			try {<br /> <br /> 				// signals the MIDlet to terminate and enter the Destroyed state<br /> 				destroyApp(false);<br /> 			} catch (MIDletStateChangeException e) {<br /> 				e.printStackTrace();<br /> 			}<br /> <br /> 			// notify the application management software that it has entered<br /> 			// into the Destroyed state<br /> 			notifyDestroyed();<br /> 		}<br /> 	}<br /> <br /> 	protected void pauseApp() {<br /> 	}<br /> <br /> 	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {<br /> 	}<br /> }<br /> [/code]<br /> <br /> Abraços,<br /> <br /> Alcides Flach<br /> <br /> www.pizzariaveneza.net]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/195403/981232/reerro-no-codigo
</guid>
				<link>http://www.guj.com.br/prepost/195403/981232/reerro-no-codigo
</link>
				<pubDate><![CDATA[Fri, 28 Nov 2008 03:27:52]]> GMT</pubDate>
				<author><![CDATA[ alcidesflachPJ]]></author>
			</item>
			<item>
				<title>Re:Erro no codigo.</title>
				<description><![CDATA[ Oi RHKW o negocio seguinte, o seu metodo ta com nome trocado:<br /> public void stardApp(){  deveria ser public void startApp(){ , tente inverter o nome. Blzinha??? Abraços.]]></description>
				<guid isPermaLink="true">http://www.guj.com.br/prepost/195403/981371/reerro-no-codigo
</guid>
				<link>http://www.guj.com.br/prepost/195403/981371/reerro-no-codigo
</link>
				<pubDate><![CDATA[Mon, 29 Dec 2008 16:13:19]]> GMT</pubDate>
				<author><![CDATA[ fran23PJ]]></author>
			</item>
	</channel>
</rss>
