<?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; JOptionPane</title>
	<atom:link href="http://samet.kilictas.com/tag/joptionpane/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 #2 &#8211; JOptionPane JCombobox</title>
		<link>http://samet.kilictas.com/example-code-2-joptionpane-jcombobox/</link>
		<comments>http://samet.kilictas.com/example-code-2-joptionpane-jcombobox/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 13:39:19 +0000</pubDate>
		<dc:creator>Samet Kilictas</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[JComboBox]]></category>
		<category><![CDATA[JOptionPane]]></category>
		<category><![CDATA[showInputDialog]]></category>

		<guid isPermaLink="false">http://samet.kilictas.com/?p=183</guid>
		<description><![CDATA[This code shows how to add ComboBox property to JOptionPane.showInputDialog. And the class is able to take an input from this combobox import javax.swing.JOptionPane; public class Options { public Options() { String smallList[] = {&#34;Sunday&#34;, &#34;Monday&#34;, &#34;Tuesday&#34;, &#34;Wednesday&#34;, &#34;Thrusday&#34;, &#34;Friday&#34;, &#34;Saturday&#34; }; String value = (String)JOptionPane.showInputDialog( null, &#34;What is your favourt day?&#34;, &#34;Which day?&#34;, JOptionPane.QUESTION_MESSAGE, [...]]]></description>
			<content:encoded><![CDATA[<p>This code shows how to add ComboBox property to JOptionPane.showInputDialog. And the class is able to take an input from this combobox</p>
<pre class="brush: java">
import javax.swing.JOptionPane;

public class Options {

	public Options() {

		String smallList[] = {&quot;Sunday&quot;, &quot;Monday&quot;, &quot;Tuesday&quot;, &quot;Wednesday&quot;,
				&quot;Thrusday&quot;, &quot;Friday&quot;, &quot;Saturday&quot; };</pre>
<p><span id="more-183"></span></p>
<pre class="brush: java">
		String value = (String)JOptionPane.showInputDialog(
				null,
				&quot;What is your favourt day?&quot;,
				&quot;Which day?&quot;,
				JOptionPane.QUESTION_MESSAGE,
				null, // Use default icon
				smallList,
				smallList[smallList.length-1]);

		JOptionPane.showMessageDialog(null,
				&quot;Your favourit Day: &quot; + value);

	}
	public static void main(String[] args) {
		new Options();
	}

}</pre>
<a href='http://twitter.com/share?url=http%3A%2F%2Fsamet.kilictas.com%2F%3Fp%3D183&count=vertical&related=&text=Example%20Code%20%232%20-%20JOptionPane%20JCombobox' class='twitter-share-button' data-text='Example Code #2 - JOptionPane JCombobox' data-url='http://samet.kilictas.com/?p=183' data-counturl='http://samet.kilictas.com/example-code-2-joptionpane-jcombobox/' data-count='vertical' data-via='sametkilictas'>Tweet</a>]]></content:encoded>
			<wfw:commentRss>http://samet.kilictas.com/example-code-2-joptionpane-jcombobox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>

