<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "image problem in netbeans 6.1"]]></title>
		<link>http://forums.hotjoe.com/posts/list/3.page</link>
		<description><![CDATA[Latest messages posted in the topic "image problem in netbeans 6.1"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>image problem in netbeans 6.1</title>
				<description><![CDATA[ Hi all hope you can help,<br /> <br /> Im using a jframe form and my program is a mars lander that moves left, right up and down with the keyboard arrows.<br /> <br /> I am using a jLabel for the lander image but want to know how I can have it so that the image icon is swapped when i press an arrow. i.e. I want an image of my spaceship to display thrusters to the left and right when i press the arrow keys respectively.<br /> <br /> Here is my code for the movement, it works just fine;<br /> <br /> <br />     private void jPanel1KeyPressed(java.awt.event.KeyEvent evt) {                                   <br />  System.out.println(evt.getKeyCode());<br />  switch (evt.getKeyCode()){<br />      case ARROW_RIGHT:<br />          x++;<br />          break;<br />      case ARROW_LEFT:<br />          x--;<br />          break;<br />       case ARROW_UP:<br />          y--;<br />          break;<br />       case ARROW_DOWN:<br />          y++;<br />          break;<br /> <br />  }<br />  <br /> I thought maybe using the image url after the (x--) statement would work but cant find help on the syntax. Any ideas?<br /> <br /> Thanks in advance. <img src="http://forums.hotjoe.com//images/smilies/3b63d1616c5dfcf29f8a7a031aaa7cad.gif" />]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/689/2592.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/689/2592.page</link>
				<pubDate><![CDATA[Tue, 9 Feb 2010 14:35:46]]> GMT</pubDate>
				<author><![CDATA[ freemefast]]></author>
			</item>
	</channel>
</rss>
