<?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>hihn.org &#187; i/o</title>
	<atom:link href="http://hihn.org/tag/io/feed/" rel="self" type="application/rss+xml" />
	<link>http://hihn.org</link>
	<description></description>
	<lastBuildDate>Mon, 05 Mar 2012 19:04:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Datei einlesen</title>
		<link>http://hihn.org/2008/02/datei-einlesen/</link>
		<comments>http://hihn.org/2008/02/datei-einlesen/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 20:21:32 +0000</pubDate>
		<dc:creator>rh</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[i/o]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://hihn.org/?p=48</guid>
		<description><![CDATA[Ich habe mit einem GUI-Editor in Java angefangen und kann mittlerweile mit folgendem Code eine Datei erfolgreich in einer Textarea wiedergeben: import java.io.*; (....) private void jButton1MouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling code here: final JFileChooser fc = new JFileChooser(); int returnVal = fc.showOpenDialog(jTextArea1); if(returnVal == 0) { String lesen; jLabel1.setText("file: " + [...]]]></description>
			<content:encoded><![CDATA[<p>Ich habe mit einem GUI-Editor in Java angefangen und kann mittlerweile mit folgendem Code eine Datei erfolgreich in einer Textarea wiedergeben:</p>
<pre>
import java.io.*;

(....)

private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {
	// TODO add your handling code here:
	final JFileChooser fc = new JFileChooser();
	int returnVal = fc.showOpenDialog(jTextArea1);

	if(returnVal == 0) {
		String lesen;
		jLabel1.setText("file: " + fc.getName(fc.getSelectedFile()));

		try{
			// new file reader
			in = new BufferedReader(new FileReader(fc.getSelectedFile()));
			while((lesen=in.readLine())!=null) {
				jTextArea1.append(lesen+"\r\n");
			}
			in.close(); // closing file
			}
			catch(Exception ex1) {
				System.out.println(ex1);
			}
	}
	else {
		jTextArea1.setText("abort");
	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://hihn.org/2008/02/datei-einlesen/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

