<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki.byte-welt.net/index.php?action=history&amp;feed=atom&amp;title=JTable_dynamisch_Zeilen_hinzuf%C3%BCgen_und_entfernen</id>
	<title>JTable dynamisch Zeilen hinzufügen und entfernen - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.byte-welt.net/index.php?action=history&amp;feed=atom&amp;title=JTable_dynamisch_Zeilen_hinzuf%C3%BCgen_und_entfernen"/>
	<link rel="alternate" type="text/html" href="https://wiki.byte-welt.net/index.php?title=JTable_dynamisch_Zeilen_hinzuf%C3%BCgen_und_entfernen&amp;action=history"/>
	<updated>2026-08-20T07:40:59Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Byte-Welt Wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://wiki.byte-welt.net/index.php?title=JTable_dynamisch_Zeilen_hinzuf%C3%BCgen_und_entfernen&amp;diff=7855&amp;oldid=prev</id>
		<title>L-ectron-X am 28. März 2018 um 09:33 Uhr</title>
		<link rel="alternate" type="text/html" href="https://wiki.byte-welt.net/index.php?title=JTable_dynamisch_Zeilen_hinzuf%C3%BCgen_und_entfernen&amp;diff=7855&amp;oldid=prev"/>
		<updated>2018-03-28T09:33:04Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 28. März 2018, 09:33 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l100&quot;&gt;Zeile 100:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 100:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Kategorie:Java]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Kategorie:Swing]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Kategorie:Swing]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Kategorie:JTable]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Kategorie:JTable]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>L-ectron-X</name></author>
	</entry>
	<entry>
		<id>https://wiki.byte-welt.net/index.php?title=JTable_dynamisch_Zeilen_hinzuf%C3%BCgen_und_entfernen&amp;diff=7710&amp;oldid=prev</id>
		<title>L-ectron-X am 9. März 2018 um 15:03 Uhr</title>
		<link rel="alternate" type="text/html" href="https://wiki.byte-welt.net/index.php?title=JTable_dynamisch_Zeilen_hinzuf%C3%BCgen_und_entfernen&amp;diff=7710&amp;oldid=prev"/>
		<updated>2018-03-09T15:03:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 9. März 2018, 15:03 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Zeile 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Mit folgendem Code kann man, ähnlich wie in Excel Zeilen dynamisch beim Scrollen in die JTable einfügen oder auch leere, nicht benutzte Zeilen wieder löschen.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Mit folgendem Code kann man, ähnlich wie in Excel Zeilen dynamisch beim Scrollen in die JTable einfügen oder auch leere, nicht benutzte Zeilen wieder löschen.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;code&lt;/del&gt;=java&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight lang&lt;/ins&gt;=&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;java&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&quot;&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;import java.awt.*;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;import java.awt.*;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;import java.awt.event.*;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;import java.awt.event.*;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l98&quot;&gt;Zeile 98:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 98:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;code=java&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Kategorie:Java]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Kategorie:Java]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>L-ectron-X</name></author>
	</entry>
	<entry>
		<id>https://wiki.byte-welt.net/index.php?title=JTable_dynamisch_Zeilen_hinzuf%C3%BCgen_und_entfernen&amp;diff=6494&amp;oldid=prev</id>
		<title>L-ectron-x am 27. Mai 2014 um 11:22 Uhr</title>
		<link rel="alternate" type="text/html" href="https://wiki.byte-welt.net/index.php?title=JTable_dynamisch_Zeilen_hinzuf%C3%BCgen_und_entfernen&amp;diff=6494&amp;oldid=prev"/>
		<updated>2014-05-27T11:22:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 27. Mai 2014, 11:22 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l105&quot;&gt;Zeile 105:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 105:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Kategorie:Java-Codeschnipsel]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Kategorie:Java-Codeschnipsel]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Basieren &lt;/del&gt;auf einem Codebeispiel von Marco13&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;span style=&quot;font-size:9px; color:aaa;&quot;&amp;gt;(Basierend &lt;/ins&gt;auf einem Codebeispiel von Marco13&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&amp;lt;/span&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>L-ectron-x</name></author>
	</entry>
	<entry>
		<id>https://wiki.byte-welt.net/index.php?title=JTable_dynamisch_Zeilen_hinzuf%C3%BCgen_und_entfernen&amp;diff=6493&amp;oldid=prev</id>
		<title>L-ectron-x am 27. Mai 2014 um 11:19 Uhr</title>
		<link rel="alternate" type="text/html" href="https://wiki.byte-welt.net/index.php?title=JTable_dynamisch_Zeilen_hinzuf%C3%BCgen_und_entfernen&amp;diff=6493&amp;oldid=prev"/>
		<updated>2014-05-27T11:19:06Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://wiki.byte-welt.net/index.php?title=JTable_dynamisch_Zeilen_hinzuf%C3%BCgen_und_entfernen&amp;amp;diff=6493&amp;amp;oldid=6492&quot;&gt;Änderungen zeigen&lt;/a&gt;</summary>
		<author><name>L-ectron-x</name></author>
	</entry>
	<entry>
		<id>https://wiki.byte-welt.net/index.php?title=JTable_dynamisch_Zeilen_hinzuf%C3%BCgen_und_entfernen&amp;diff=6492&amp;oldid=prev</id>
		<title>L-ectron-x: Die Seite wurde neu angelegt: „Mit folgendem Code kann man, ähnlich wie in Excel Zeilen dynamisch beim Scrollen in die JTable einfügen oder auch leere, nicht benutzte Zeilen wieder löschen. …“</title>
		<link rel="alternate" type="text/html" href="https://wiki.byte-welt.net/index.php?title=JTable_dynamisch_Zeilen_hinzuf%C3%BCgen_und_entfernen&amp;diff=6492&amp;oldid=prev"/>
		<updated>2014-05-27T11:16:28Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „Mit folgendem Code kann man, ähnlich wie in Excel Zeilen dynamisch beim Scrollen in die JTable einfügen oder auch leere, nicht benutzte Zeilen wieder löschen. …“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Mit folgendem Code kann man, ähnlich wie in Excel Zeilen dynamisch beim Scrollen in die JTable einfügen oder auch leere, nicht benutzte Zeilen wieder löschen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code=java&amp;gt;&lt;br /&gt;
import java.awt.*;&lt;br /&gt;
import java.awt.event.*;&lt;br /&gt;
&lt;br /&gt;
import javax.swing.*;&lt;br /&gt;
import javax.swing.table.*;&lt;br /&gt;
public class DynamicRows extends JFrame implements AdjustmentListener {&lt;br /&gt;
	private JScrollPane jScrollPane1;&lt;br /&gt;
	private JTable jTable1;&lt;br /&gt;
	private DefaultTableModel model;&lt;br /&gt;
	private int yVisible, yVisibleOld;&lt;br /&gt;
	private boolean valueIsAdjusting = false;&lt;br /&gt;
	public DynamicRows() {&lt;br /&gt;
		super(&amp;quot;DynamicRows&amp;quot;);&lt;br /&gt;
		setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);&lt;br /&gt;
		setSize(400, 300);&lt;br /&gt;
		setLocationRelativeTo(null);&lt;br /&gt;
		jScrollPane1 = new JScrollPane();&lt;br /&gt;
		jTable1 = new JTable();&lt;br /&gt;
		jTable1.setModel(new DefaultTableModel(&lt;br /&gt;
				new Object[][]{},&lt;br /&gt;
				new String[]{&lt;br /&gt;
						&amp;quot;Title 1&amp;quot;, &amp;quot;Title 2&amp;quot;, &amp;quot;Title 3&amp;quot;, &amp;quot;Title 4&amp;quot;&lt;br /&gt;
				}));&lt;br /&gt;
		jScrollPane1.setViewportView(jTable1);&lt;br /&gt;
		getContentPane().add(jScrollPane1, BorderLayout.CENTER);&lt;br /&gt;
		model = (DefaultTableModel) jTable1.getModel();&lt;br /&gt;
		for (int i = 0; i &amp;lt; 20; i++) {&lt;br /&gt;
			model.addRow(new Object[]{null, null, null, null});&lt;br /&gt;
&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		jScrollPane1.getVerticalScrollBar().addAdjustmentListener(this);&lt;br /&gt;
	}&lt;br /&gt;
	public void adjustmentValueChanged(final AdjustmentEvent e) {&lt;br /&gt;
		if(e.getValueIsAdjusting()){&lt;br /&gt;
			valueIsAdjusting = true;&lt;br /&gt;
			return ;&lt;br /&gt;
		}&lt;br /&gt;
		Adjustable a = e.getAdjustable();&lt;br /&gt;
		Rectangle rectBottom = jTable1.getCellRect(model.getRowCount()-1, 0, true);&lt;br /&gt;
		int yBottom = rectBottom.y + rectBottom.height;&lt;br /&gt;
		Rectangle rectVisible = jTable1.getVisibleRect();&lt;br /&gt;
		yVisible = rectVisible.y + rectVisible.height;&lt;br /&gt;
		//if we are scrolling upwards:&lt;br /&gt;
		if (yVisible != 0 &amp;amp;&amp;amp; yVisible &amp;lt; yVisibleOld) {&lt;br /&gt;
			//remove all invisible rows if they area empty (from bottom to top):&lt;br /&gt;
			boolean remove = true;&lt;br /&gt;
			for (int row = jTable1.getRowCount() - 1; row &amp;gt; -1; row--) {&lt;br /&gt;
				if (jTable1.getCellRect(row, 0, true).y &amp;gt; yVisible) {//if row is invisible&lt;br /&gt;
					for (int column = 0; column &amp;lt; jTable1.getColumnCount(); column++) {&lt;br /&gt;
						Object value = jTable1.getValueAt(row, column);&lt;br /&gt;
						if (value != null) {//if the row is not empty&lt;br /&gt;
							remove = false;//do not remove any more rows&lt;br /&gt;
						}&lt;br /&gt;
					}&lt;br /&gt;
					if (remove) {&lt;br /&gt;
						model.removeRow(row);&lt;br /&gt;
					}&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		} else {&lt;br /&gt;
			//here we are scrolling downwards&lt;br /&gt;
			//if visible area is at bottom:&lt;br /&gt;
			if ((yBottom == yVisible)) {&lt;br /&gt;
				if(valueIsAdjusting){&lt;br /&gt;
					valueIsAdjusting = false;&lt;br /&gt;
					rectVisible.y = rectVisible.y - 2;&lt;br /&gt;
					yVisible = yVisible - 2;&lt;br /&gt;
					jTable1.scrollRectToVisible(rectVisible);&lt;br /&gt;
				}&lt;br /&gt;
				else{&lt;br /&gt;
					a.removeAdjustmentListener(this);&lt;br /&gt;
					//add new row and scroll to visible:&lt;br /&gt;
					model.addRow(new Object[]{null, null, null, null});&lt;br /&gt;
					rectBottom = jTable1.getCellRect(model.getRowCount() - 1, 0, true);&lt;br /&gt;
					rectBottom.height = rectBottom.height - 1;&lt;br /&gt;
					jTable1.scrollRectToVisible(rectBottom);&lt;br /&gt;
					a.addAdjustmentListener(this);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		yVisibleOld = yVisible;&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
	public static void main(final String args[]) {&lt;br /&gt;
		EventQueue.invokeLater(new &lt;br /&gt;
				Runnable() {&lt;br /&gt;
			public void run() {&lt;br /&gt;
				new DynamicRows().setVisible(true);&lt;br /&gt;
			}&lt;br /&gt;
		});&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code=java&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:Java]]&lt;br /&gt;
[[Kategorie:Swing]]&lt;br /&gt;
[[Kategorie:JTable]]&lt;br /&gt;
[[Kategorie:Java-Codeschnipsel]]&lt;/div&gt;</summary>
		<author><name>L-ectron-x</name></author>
	</entry>
</feed>