<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Samet Kilictas&#039;s Blog &#187; ArrayList</title>
	<atom:link href="http://samet.kilictas.com/tag/arraylist/feed/" rel="self" type="application/rss+xml" />
	<link>http://samet.kilictas.com</link>
	<description>J2E, PHP, Linux, PL/SQL and other random rants</description>
	<lastBuildDate>Sun, 06 Nov 2011 04:36:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Example Code #1 &#8211; JOptionPane and ArrayList</title>
		<link>http://samet.kilictas.com/example-code-1-joptionpane-and-arraylist/</link>
		<comments>http://samet.kilictas.com/example-code-1-joptionpane-and-arraylist/#comments</comments>
		<pubDate>Sat, 20 Dec 2008 13:39:18 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ArrayList]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[JOptionPane]]></category>
		<category><![CDATA[showInputDialog]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=181</guid>
		<description><![CDATA[Here this class takes some values using JOptionPane.showInputDialog and shows them to the user using foreach loop import java.util.ArrayList; import javax.swing.JOptionPane; public class Confirm { ArrayList fruits = new ArrayList(); Confirm(){ String value = &#34;&#34;; while (true){ value = JOptionPane.showInputDialog(&#34;Which fruit to Add?&#34;); if (!value.equals(&#34;&#34;) ) { fruits.add(value); } else break; } for (String s [...]]]></description>
			<content:encoded><![CDATA[<p>Here this class takes some values using JOptionPane.showInputDialog and shows them to the user using foreach loop</p>
<p><a class="aligncenter" href="http://samet.kilictas.com/wp-content/uploads/2008/12/qwe1.jpg"><img class="alignnone size-full wp-image-185" title="Options" src="http://samet.kilictas.com/wp-content/uploads/2008/12/qwe1.jpg" alt="" width="305" height="131" /></a></p>
<pre class="brush: java">import java.util.ArrayList;
import javax.swing.JOptionPane;

public class Confirm {

ArrayList fruits = new ArrayList();

Confirm(){
String value = &quot;&quot;;
while (true){
value = JOptionPane.showInputDialog(&quot;Which fruit to Add?&quot;);
</pre>
<p><span id="more-181"></span></p>
<pre class="brush: java">
if (!value.equals(&quot;&quot;) )
{
fruits.add(value);
}
else
break;

}

for (String s : fruits) {
int n = JOptionPane.showConfirmDialog
(null,
s,
&quot;Apple list&quot;,
JOptionPane.YES_NO_OPTION);

System.out.println(&quot;n value:&quot; + n);

if (n == JOptionPane.YES_OPTION)
continue;
else if (n == JOptionPane.NO_OPTION)
break;
else if (n == JOptionPane.CLOSED_OPTION)
JOptionPane.showMessageDialog(null, &quot;you clicked to close&quot;);
}
}

public static void main(String[] args) {

new Confirm();

}

}
</pre>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D181&count=vertical&related=&text=Example%20Code%20%231%20-%20JOptionPane%20and%20ArrayList' class='twitter-share-button' data-text='Example Code #1 - JOptionPane and ArrayList' data-url='http://samet.kilictas.com/?p=181' data-counturl='http://samet.kilictas.com/example-code-1-joptionpane-and-arraylist/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/example-code-1-joptionpane-and-arraylist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

