﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>语源科技BlogJava-原子一号</title><link>http://www.blogjava.net/zen/</link><description>The number one of atom</description><language>zh-cn</language><lastBuildDate>Fri, 17 Apr 2026 22:39:31 GMT</lastBuildDate><pubDate>Fri, 17 Apr 2026 22:39:31 GMT</pubDate><ttl>60</ttl><item><title>Java文件流的封装</title><link>http://www.blogjava.net/zen/archive/2006/10/31/78380.html</link><dc:creator>迟到的鱼</dc:creator><author>迟到的鱼</author><pubDate>Tue, 31 Oct 2006 15:23:00 GMT</pubDate><guid>http://www.blogjava.net/zen/archive/2006/10/31/78380.html</guid><wfw:comment>http://www.blogjava.net/zen/comments/78380.html</wfw:comment><comments>http://www.blogjava.net/zen/archive/2006/10/31/78380.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zen/comments/commentRss/78380.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zen/services/trackbacks/78380.html</trackback:ping><description><![CDATA[Reader 读入流<br /><img src="/zen/gallery/image/5788.html" /><br /><br />
Writer 输出流<br /><img src="/zen/gallery/image/5789.html" /><br /><br />
InputStreamReader 读入流  OutputStreamWriter 输出流<br /><img src="/zen/gallery/image/5791.html" /><br /><br />
BufferedRead BufferedWriter  缓冲流<br /><img src="/zen/gallery/image/5790.html" /><br /><br />
封装形式<br />
——————<br />
功能流(字符流（字节流）)<br /><br /><br />
&lt;以上为图片显示，如想查看，请右键点击查看图片。或者查看相册Java文件流。&gt;<br /><img src ="http://www.blogjava.net/zen/aggbug/78380.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zen/" target="_blank">迟到的鱼</a> 2006-10-31 23:23 <a href="http://www.blogjava.net/zen/archive/2006/10/31/78380.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>观感</title><link>http://www.blogjava.net/zen/archive/2006/10/19/76169.html</link><dc:creator>迟到的鱼</dc:creator><author>迟到的鱼</author><pubDate>Thu, 19 Oct 2006 07:05:00 GMT</pubDate><guid>http://www.blogjava.net/zen/archive/2006/10/19/76169.html</guid><wfw:comment>http://www.blogjava.net/zen/comments/76169.html</wfw:comment><comments>http://www.blogjava.net/zen/archive/2006/10/19/76169.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zen/comments/commentRss/76169.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zen/services/trackbacks/76169.html</trackback:ping><description><![CDATA[
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<img id="Code_Closed_Image_150454" onclick="this.style.display='none'; Code_Closed_Text_150454.style.display='none'; Code_Open_Image_150454.style.display='inline'; Code_Open_Text_150454.style.display='inline';" height="16" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" width="11" align="top" />
				<img id="Code_Open_Image_150454" style="DISPLAY: none" onclick="this.style.display='none'; Code_Open_Text_150454.style.display='none'; Code_Closed_Image_150454.style.display='inline'; Code_Closed_Text_150454.style.display='inline';" height="16" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" width="11" align="top" />
				<span id="Code_Closed_Text_150454" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
				</span>
				<span id="Code_Open_Text_150454" style="DISPLAY: none">
						<br />
						<!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>-->
						<span style="COLOR: #008080"> 1</span>
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<span style="COLOR: #0000ff">import</span>
						<span style="COLOR: #000000"> java.awt.</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 2</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">import</span>
						<span style="COLOR: #000000"> java.awt.event.</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 3</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">import</span>
						<span style="COLOR: #000000"> javax.swing.</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 4</span>
						<span style="COLOR: #000000">
								<img id="Codehighlighter1_96_729_Open_Image" onclick="this.style.display='none'; Codehighlighter1_96_729_Open_Text.style.display='none'; Codehighlighter1_96_729_Closed_Image.style.display='inline'; Codehighlighter1_96_729_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
								<img id="Codehighlighter1_96_729_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_96_729_Closed_Text.style.display='none'; Codehighlighter1_96_729_Open_Image.style.display='inline'; Codehighlighter1_96_729_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">class</span>
						<span style="COLOR: #000000"> PlafPanel </span>
						<span style="COLOR: #0000ff">extends</span>
						<span style="COLOR: #000000"> JPanel</span>
						<span id="Codehighlighter1_96_729_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_96_729_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080"> 5</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_117_335_Open_Image" onclick="this.style.display='none'; Codehighlighter1_117_335_Open_Text.style.display='none'; Codehighlighter1_117_335_Closed_Image.style.display='inline'; Codehighlighter1_117_335_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_117_335_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_117_335_Closed_Text.style.display='none'; Codehighlighter1_117_335_Open_Image.style.display='inline'; Codehighlighter1_117_335_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> PlafPanel()</span>
								<span id="Codehighlighter1_117_335_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_117_335_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080"> 6</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        makeButton(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">Metal</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">javax.swing.plaf.metal.MetalLookAndFeel</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080"> 7</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        makeButton(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">Motif</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">com.sun.java.swing.plaf.motif.MotifLookAndFeel</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080"> 8</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        makeButton(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">Windows</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">com.sun.java.swing.plaf.windows.WindowsLookAndFeel</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080"> 9</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">10</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_388_725_Open_Image" onclick="this.style.display='none'; Codehighlighter1_388_725_Open_Text.style.display='none'; Codehighlighter1_388_725_Closed_Image.style.display='inline'; Codehighlighter1_388_725_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_388_725_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_388_725_Closed_Text.style.display='none'; Codehighlighter1_388_725_Open_Image.style.display='inline'; Codehighlighter1_388_725_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">void</span>
								<span style="COLOR: #000000"> makeButton(String name,</span>
								<span style="COLOR: #0000ff">final</span>
								<span style="COLOR: #000000"> String plafName)</span>
								<span id="Codehighlighter1_388_725_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_388_725_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">11</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        JButton button</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> JButton(name);<br /></span>
										<span style="COLOR: #008080">12</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        add(button);<br /></span>
										<span style="COLOR: #008080">13</span>
										<span style="COLOR: #000000">
												<img id="Codehighlighter1_488_720_Open_Image" onclick="this.style.display='none'; Codehighlighter1_488_720_Open_Text.style.display='none'; Codehighlighter1_488_720_Closed_Image.style.display='inline'; Codehighlighter1_488_720_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
												<img id="Codehighlighter1_488_720_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_488_720_Closed_Text.style.display='none'; Codehighlighter1_488_720_Open_Image.style.display='inline'; Codehighlighter1_488_720_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        button.addActionListener(</span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> ActionListener()</span>
										<span id="Codehighlighter1_488_720_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
												<img src="http://www.blogjava.net/images/dot.gif" />
										</span>
										<span id="Codehighlighter1_488_720_Open_Text">
												<span style="COLOR: #000000">{<br /></span>
												<span style="COLOR: #008080">14</span>
												<span style="COLOR: #000000">
														<img id="Codehighlighter1_540_716_Open_Image" onclick="this.style.display='none'; Codehighlighter1_540_716_Open_Text.style.display='none'; Codehighlighter1_540_716_Closed_Image.style.display='inline'; Codehighlighter1_540_716_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
														<img id="Codehighlighter1_540_716_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_540_716_Closed_Text.style.display='none'; Codehighlighter1_540_716_Open_Image.style.display='inline'; Codehighlighter1_540_716_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span>
												<span style="COLOR: #0000ff">public</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">void</span>
												<span style="COLOR: #000000"> actionPerformed(ActionEvent event)</span>
												<span id="Codehighlighter1_540_716_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
														<img src="http://www.blogjava.net/images/dot.gif" />
												</span>
												<span id="Codehighlighter1_540_716_Open_Text">
														<span style="COLOR: #000000">{<br /></span>
														<span style="COLOR: #008080">15</span>
														<span style="COLOR: #000000">
																<img id="Codehighlighter1_549_655_Open_Image" onclick="this.style.display='none'; Codehighlighter1_549_655_Open_Text.style.display='none'; Codehighlighter1_549_655_Closed_Image.style.display='inline'; Codehighlighter1_549_655_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
																<img id="Codehighlighter1_549_655_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_549_655_Closed_Text.style.display='none'; Codehighlighter1_549_655_Open_Image.style.display='inline'; Codehighlighter1_549_655_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span>
														<span style="COLOR: #0000ff">try</span>
														<span id="Codehighlighter1_549_655_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
																<img src="http://www.blogjava.net/images/dot.gif" />
														</span>
														<span id="Codehighlighter1_549_655_Open_Text">
																<span style="COLOR: #000000">{<br /></span>
																<span style="COLOR: #008080">16</span>
																<span style="COLOR: #000000">
																		<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />                    UIManager.setLookAndFeel(plafName);<br /></span>
																<span style="COLOR: #008080">17</span>
																<span style="COLOR: #000000">
																		<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />                    SwingUtilities.updateComponentTreeUI(PlafPanel.</span>
																<span style="COLOR: #0000ff">this</span>
																<span style="COLOR: #000000">);<br /></span>
																<span style="COLOR: #008080">18</span>
																<span style="COLOR: #000000">
																		<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span>
														</span>
														<span style="COLOR: #000000">
																<br />
														</span>
														<span style="COLOR: #008080">19</span>
														<span style="COLOR: #000000">
																<img id="Codehighlighter1_679_711_Open_Image" onclick="this.style.display='none'; Codehighlighter1_679_711_Open_Text.style.display='none'; Codehighlighter1_679_711_Closed_Image.style.display='inline'; Codehighlighter1_679_711_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
																<img id="Codehighlighter1_679_711_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_679_711_Closed_Text.style.display='none'; Codehighlighter1_679_711_Open_Image.style.display='inline'; Codehighlighter1_679_711_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span>
														<span style="COLOR: #0000ff">catch</span>
														<span style="COLOR: #000000">(Exception e)</span>
														<span id="Codehighlighter1_679_711_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
																<img src="http://www.blogjava.net/images/dot.gif" />
														</span>
														<span id="Codehighlighter1_679_711_Open_Text">
																<span style="COLOR: #000000">{<br /></span>
																<span style="COLOR: #008080">20</span>
																<span style="COLOR: #000000">
																		<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />                    e.printStackTrace();<br /></span>
																<span style="COLOR: #008080">21</span>
																<span style="COLOR: #000000">
																		<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                }</span>
														</span>
														<span style="COLOR: #000000">
																<br />
														</span>
														<span style="COLOR: #008080">22</span>
														<span style="COLOR: #000000">
																<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />            }</span>
												</span>
												<span style="COLOR: #000000">
														<br />
												</span>
												<span style="COLOR: #008080">23</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
										</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080">24</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">25</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    <br /></span>
								<span style="COLOR: #008080">26</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
						</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #008080">27</span>
						<span style="COLOR: #000000">
								<img id="Codehighlighter1_761_1044_Open_Image" onclick="this.style.display='none'; Codehighlighter1_761_1044_Open_Text.style.display='none'; Codehighlighter1_761_1044_Closed_Image.style.display='inline'; Codehighlighter1_761_1044_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
								<img id="Codehighlighter1_761_1044_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_761_1044_Closed_Text.style.display='none'; Codehighlighter1_761_1044_Open_Image.style.display='inline'; Codehighlighter1_761_1044_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">class</span>
						<span style="COLOR: #000000"> PlafFrame </span>
						<span style="COLOR: #0000ff">extends</span>
						<span style="COLOR: #000000"> JFrame</span>
						<span id="Codehighlighter1_761_1044_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_761_1044_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080">28</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">static</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">final</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000"> DEFAULT_WIDTH</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">300</span>
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">29</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">static</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">final</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000"> DEFAULT_HEIGHT</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">200</span>
								<span style="COLOR: #000000">;<br /></span>
								<span style="COLOR: #008080">30</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_871_1042_Open_Image" onclick="this.style.display='none'; Codehighlighter1_871_1042_Open_Text.style.display='none'; Codehighlighter1_871_1042_Closed_Image.style.display='inline'; Codehighlighter1_871_1042_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_871_1042_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_871_1042_Closed_Text.style.display='none'; Codehighlighter1_871_1042_Open_Image.style.display='inline'; Codehighlighter1_871_1042_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> PlafFrame()</span>
								<span id="Codehighlighter1_871_1042_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_871_1042_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">31</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        setTitle(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">PlafTest</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080">32</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        setSize(DEFAULT_WIDTH,DEFAULT_HEIGHT);<br /></span>
										<span style="COLOR: #008080">33</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        PlafPanel panel</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> PlafPanel();<br /></span>
										<span style="COLOR: #008080">34</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        Container contentPane</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000">getContentPane();<br /></span>
										<span style="COLOR: #008080">35</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        contentPane.add(panel);<br /></span>
										<span style="COLOR: #008080">36</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">37</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
						</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #008080">38</span>
						<span style="COLOR: #000000">
								<img id="Codehighlighter1_1068_1231_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1068_1231_Open_Text.style.display='none'; Codehighlighter1_1068_1231_Closed_Image.style.display='inline'; Codehighlighter1_1068_1231_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
								<img id="Codehighlighter1_1068_1231_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1068_1231_Closed_Text.style.display='none'; Codehighlighter1_1068_1231_Open_Image.style.display='inline'; Codehighlighter1_1068_1231_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">public</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">class</span>
						<span style="COLOR: #000000"> PlafTest </span>
						<span id="Codehighlighter1_1068_1231_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_1068_1231_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080">39</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_1109_1229_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1109_1229_Open_Text.style.display='none'; Codehighlighter1_1109_1229_Closed_Image.style.display='inline'; Codehighlighter1_1109_1229_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_1109_1229_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1109_1229_Closed_Text.style.display='none'; Codehighlighter1_1109_1229_Open_Image.style.display='inline'; Codehighlighter1_1109_1229_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">static</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">void</span>
								<span style="COLOR: #000000"> main(String[] args)</span>
								<span id="Codehighlighter1_1109_1229_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_1109_1229_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">40</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        PlafFrame frame</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> PlafFrame();<br /></span>
										<span style="COLOR: #008080">41</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<br /></span>
										<span style="COLOR: #008080">42</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        frame.setVisible(</span>
										<span style="COLOR: #0000ff">true</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080">43</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">44</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
						</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #008080">45</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
				</span>
		</div>
<img src ="http://www.blogjava.net/zen/aggbug/76169.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zen/" target="_blank">迟到的鱼</a> 2006-10-19 15:05 <a href="http://www.blogjava.net/zen/archive/2006/10/19/76169.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>自扩展JTextField-2</title><link>http://www.blogjava.net/zen/archive/2006/10/19/76167.html</link><dc:creator>迟到的鱼</dc:creator><author>迟到的鱼</author><pubDate>Thu, 19 Oct 2006 07:03:00 GMT</pubDate><guid>http://www.blogjava.net/zen/archive/2006/10/19/76167.html</guid><wfw:comment>http://www.blogjava.net/zen/comments/76167.html</wfw:comment><comments>http://www.blogjava.net/zen/archive/2006/10/19/76167.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zen/comments/commentRss/76167.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zen/services/trackbacks/76167.html</trackback:ping><description><![CDATA[
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<img id="Code_Closed_Image_150220" onclick="this.style.display='none'; Code_Closed_Text_150220.style.display='none'; Code_Open_Image_150220.style.display='inline'; Code_Open_Text_150220.style.display='inline';" height="16" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" width="11" align="top" />
				<img id="Code_Open_Image_150220" style="DISPLAY: none" onclick="this.style.display='none'; Code_Open_Text_150220.style.display='none'; Code_Closed_Image_150220.style.display='inline'; Code_Closed_Text_150220.style.display='inline';" height="16" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" width="11" align="top" />
				<span id="Code_Closed_Text_150220" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
				</span>
				<span id="Code_Open_Text_150220" style="DISPLAY: none">
						<br />
						<!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>-->
						<span style="COLOR: #008080"> 1</span>
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<span style="COLOR: #0000ff">import</span>
						<span style="COLOR: #000000"> java.awt.</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 2</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">import</span>
						<span style="COLOR: #000000"> javax.swing.</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 3</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">import</span>
						<span style="COLOR: #000000"> javax.swing.text.</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 4</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">import</span>
						<span style="COLOR: #000000"> java.awt.event.</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 5</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
								<br />
						</span>
						<span style="COLOR: #008080"> 6</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">public</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">class</span>
						<span style="COLOR: #000000"> TextFieldDemo </span>
						<span style="COLOR: #0000ff">extends</span>
						<span style="COLOR: #000000"> JFrame<br /></span>
						<span style="COLOR: #008080"> 7</span>
						<span style="COLOR: #000000">
								<img id="Codehighlighter1_136_814_Open_Image" onclick="this.style.display='none'; Codehighlighter1_136_814_Open_Text.style.display='none'; Codehighlighter1_136_814_Closed_Image.style.display='inline'; Codehighlighter1_136_814_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
								<img id="Codehighlighter1_136_814_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_136_814_Closed_Text.style.display='none'; Codehighlighter1_136_814_Open_Image.style.display='inline'; Codehighlighter1_136_814_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />
						</span>
						<span id="Codehighlighter1_136_814_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_136_814_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080"> 8</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> TextFieldDemo()<br /></span>
								<span style="COLOR: #008080"> 9</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_166_718_Open_Image" onclick="this.style.display='none'; Codehighlighter1_166_718_Open_Text.style.display='none'; Codehighlighter1_166_718_Closed_Image.style.display='inline'; Codehighlighter1_166_718_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_166_718_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_166_718_Closed_Text.style.display='none'; Codehighlighter1_166_718_Open_Image.style.display='inline'; Codehighlighter1_166_718_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_166_718_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_166_718_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">10</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">11</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        Container contentPane</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #0000ff">this</span>
										<span style="COLOR: #000000">.getContentPane();<br /></span>
										<span style="COLOR: #008080">12</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">13</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        contentPane.setLayout(</span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> FlowLayout());<br /></span>
										<span style="COLOR: #008080">14</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">内容窗格容器中加入两个文本组件，第一个只能输入数字        </span>
										<span style="COLOR: #008000">
												<br />
										</span>
										<span style="COLOR: #008080">15</span>
										<span style="COLOR: #008000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
										</span>
										<span style="COLOR: #000000">        DigitalText txtDigitalText </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> DigitalText(</span>
										<span style="COLOR: #000000">10</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080">16</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        JTextField txtNormal </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> JTextField(</span>
										<span style="COLOR: #000000">10</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080">17</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #008000">//</span>
										<span style="COLOR: #008000">JTextArea txtNormal=new JTextArea();</span>
										<span style="COLOR: #008000">
												<br />
										</span>
										<span style="COLOR: #008080">18</span>
										<span style="COLOR: #008000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
										</span>
										<span style="COLOR: #000000">        contentPane.add(</span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> JLabel(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">数字文本框</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">));<br /></span>
										<span style="COLOR: #008080">19</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        contentPane.add(txtDigitalText);<br /></span>
										<span style="COLOR: #008080">20</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        contentPane.add(</span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> JLabel(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">任意文本框</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">));<br /></span>
										<span style="COLOR: #008080">21</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        contentPane.add(txtNormal);<br /></span>
										<span style="COLOR: #008080">22</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">23</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        pack();<br /></span>
										<span style="COLOR: #008080">24</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        setVisible(</span>
										<span style="COLOR: #0000ff">true</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080">25</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<br /></span>
										<span style="COLOR: #008080">26</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">27</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">28</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">static</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">void</span>
								<span style="COLOR: #000000"> main(String args[]) <br /></span>
								<span style="COLOR: #008080">29</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_763_812_Open_Image" onclick="this.style.display='none'; Codehighlighter1_763_812_Open_Text.style.display='none'; Codehighlighter1_763_812_Closed_Image.style.display='inline'; Codehighlighter1_763_812_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_763_812_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_763_812_Closed_Text.style.display='none'; Codehighlighter1_763_812_Open_Image.style.display='inline'; Codehighlighter1_763_812_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_763_812_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_763_812_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">30</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />         TextFieldDemo frame </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> TextFieldDemo();<br /></span>
										<span style="COLOR: #008080">31</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">32</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
						</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #008080">33</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">该类从JTextField中派生，只允许用户输入数字</span>
						<span style="COLOR: #008000">
								<br />
						</span>
						<span style="COLOR: #008080">34</span>
						<span style="COLOR: #008000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">class</span>
						<span style="COLOR: #000000"> DigitalText </span>
						<span style="COLOR: #0000ff">extends</span>
						<span style="COLOR: #000000"> JTextField<br /></span>
						<span style="COLOR: #008080">35</span>
						<span style="COLOR: #000000">
								<img id="Codehighlighter1_882_1669_Open_Image" onclick="this.style.display='none'; Codehighlighter1_882_1669_Open_Text.style.display='none'; Codehighlighter1_882_1669_Closed_Image.style.display='inline'; Codehighlighter1_882_1669_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
								<img id="Codehighlighter1_882_1669_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_882_1669_Closed_Text.style.display='none'; Codehighlighter1_882_1669_Open_Image.style.display='inline'; Codehighlighter1_882_1669_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />
						</span>
						<span id="Codehighlighter1_882_1669_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_882_1669_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080">36</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> DigitalText()<br /></span>
								<span style="COLOR: #008080">37</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_913_919_Open_Image" onclick="this.style.display='none'; Codehighlighter1_913_919_Open_Text.style.display='none'; Codehighlighter1_913_919_Closed_Image.style.display='inline'; Codehighlighter1_913_919_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_913_919_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_913_919_Closed_Text.style.display='none'; Codehighlighter1_913_919_Open_Image.style.display='inline'; Codehighlighter1_913_919_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_913_919_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_913_919_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">38</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">39</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />       </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> DigitalText( </span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000"> column)<br /></span>
								<span style="COLOR: #008080">40</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_961_987_Open_Image" onclick="this.style.display='none'; Codehighlighter1_961_987_Open_Text.style.display='none'; Codehighlighter1_961_987_Closed_Image.style.display='inline'; Codehighlighter1_961_987_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_961_987_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_961_987_Closed_Text.style.display='none'; Codehighlighter1_961_987_Open_Image.style.display='inline'; Codehighlighter1_961_987_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_961_987_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_961_987_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">41</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">super</span>
										<span style="COLOR: #000000">(column);<br /></span>
										<span style="COLOR: #008080">42</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">43</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> DigitalText(String strText, </span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000"> column)<br /></span>
								<span style="COLOR: #008080">44</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_1044_1081_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1044_1081_Open_Text.style.display='none'; Codehighlighter1_1044_1081_Closed_Image.style.display='inline'; Codehighlighter1_1044_1081_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_1044_1081_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1044_1081_Closed_Text.style.display='none'; Codehighlighter1_1044_1081_Open_Image.style.display='inline'; Codehighlighter1_1044_1081_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_1044_1081_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_1044_1081_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">45</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">super</span>
										<span style="COLOR: #000000">(strText,column);<br /></span>
										<span style="COLOR: #008080">46</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">47</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">protected</span>
								<span style="COLOR: #000000"> Document createDefaultModel()<br /></span>
								<span style="COLOR: #008080">48</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_1131_1179_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1131_1179_Open_Text.style.display='none'; Codehighlighter1_1131_1179_Closed_Image.style.display='inline'; Codehighlighter1_1131_1179_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_1131_1179_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1131_1179_Closed_Text.style.display='none'; Codehighlighter1_1131_1179_Open_Image.style.display='inline'; Codehighlighter1_1131_1179_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_1131_1179_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_1131_1179_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">49</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">return</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> DigitalTextDocument();<br /></span>
										<span style="COLOR: #008080">50</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">51</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    <br /></span>
								<span style="COLOR: #008080">52</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">class</span>
								<span style="COLOR: #000000"> DigitalTextDocument </span>
								<span style="COLOR: #0000ff">extends</span>
								<span style="COLOR: #000000"> PlainDocument<br /></span>
								<span style="COLOR: #008080">53</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_1233_1667_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1233_1667_Open_Text.style.display='none'; Codehighlighter1_1233_1667_Closed_Image.style.display='inline'; Codehighlighter1_1233_1667_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_1233_1667_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1233_1667_Closed_Text.style.display='none'; Codehighlighter1_1233_1667_Open_Image.style.display='inline'; Codehighlighter1_1233_1667_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_1233_1667_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_1233_1667_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">54</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">public</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #0000ff">void</span>
										<span style="COLOR: #000000"> insertString( </span>
										<span style="COLOR: #0000ff">int</span>
										<span style="COLOR: #000000"> offs, String str, AttributeSet a) </span>
										<span style="COLOR: #0000ff">throws</span>
										<span style="COLOR: #000000"> BadLocationException<br /></span>
										<span style="COLOR: #008080">55</span>
										<span style="COLOR: #000000">
												<img id="Codehighlighter1_1337_1664_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1337_1664_Open_Text.style.display='none'; Codehighlighter1_1337_1664_Closed_Image.style.display='inline'; Codehighlighter1_1337_1664_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
												<img id="Codehighlighter1_1337_1664_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1337_1664_Closed_Text.style.display='none'; Codehighlighter1_1337_1664_Open_Image.style.display='inline'; Codehighlighter1_1337_1664_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
										<span id="Codehighlighter1_1337_1664_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
												<img src="http://www.blogjava.net/images/dot.gif" />
										</span>
										<span id="Codehighlighter1_1337_1664_Open_Text">
												<span style="COLOR: #000000">{<br /></span>
												<span style="COLOR: #008080">56</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
												<span style="COLOR: #0000ff">if</span>
												<span style="COLOR: #000000">( str </span>
												<span style="COLOR: #000000">==</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">null</span>
												<span style="COLOR: #000000"> ) </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">57</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
												<span style="COLOR: #0000ff">try</span>
												<span style="COLOR: #000000">
														<br />
												</span>
												<span style="COLOR: #008080">58</span>
												<span style="COLOR: #000000">
														<img id="Codehighlighter1_1396_1488_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1396_1488_Open_Text.style.display='none'; Codehighlighter1_1396_1488_Closed_Image.style.display='inline'; Codehighlighter1_1396_1488_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
														<img id="Codehighlighter1_1396_1488_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1396_1488_Closed_Text.style.display='none'; Codehighlighter1_1396_1488_Open_Image.style.display='inline'; Codehighlighter1_1396_1488_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            </span>
												<span id="Codehighlighter1_1396_1488_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
														<img src="http://www.blogjava.net/images/dot.gif" />
												</span>
												<span id="Codehighlighter1_1396_1488_Open_Text">
														<span style="COLOR: #000000">{<br /></span>
														<span style="COLOR: #008080">59</span>
														<span style="COLOR: #000000">
																<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />                Integer.parseInt(str);<br /></span>
														<span style="COLOR: #008080">60</span>
														<span style="COLOR: #000000">
																<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />                </span>
														<span style="COLOR: #0000ff">super</span>
														<span style="COLOR: #000000">.insertString(offs,str,a);<br /></span>
														<span style="COLOR: #008080">61</span>
														<span style="COLOR: #000000">
																<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />            }</span>
												</span>
												<span style="COLOR: #000000">
														<br />
												</span>
												<span style="COLOR: #008080">62</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
												<span style="COLOR: #0000ff">catch</span>
												<span style="COLOR: #000000"> ( NumberFormatException e)<br /></span>
												<span style="COLOR: #008080">63</span>
												<span style="COLOR: #000000">
														<img id="Codehighlighter1_1541_1657_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1541_1657_Open_Text.style.display='none'; Codehighlighter1_1541_1657_Closed_Image.style.display='inline'; Codehighlighter1_1541_1657_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
														<img id="Codehighlighter1_1541_1657_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1541_1657_Closed_Text.style.display='none'; Codehighlighter1_1541_1657_Open_Image.style.display='inline'; Codehighlighter1_1541_1657_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            </span>
												<span id="Codehighlighter1_1541_1657_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
														<img src="http://www.blogjava.net/images/dot.gif" />
												</span>
												<span id="Codehighlighter1_1541_1657_Open_Text">
														<span style="COLOR: #000000">{<br /></span>
														<span style="COLOR: #008080">64</span>
														<span style="COLOR: #000000">
																<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />                JOptionPane.showMessageDialog(</span>
														<span style="COLOR: #0000ff">null</span>
														<span style="COLOR: #000000">,</span>
														<span style="COLOR: #000000">"</span>
														<span style="COLOR: #000000">请输入数字。</span>
														<span style="COLOR: #000000">"</span>
														<span style="COLOR: #000000">,</span>
														<span style="COLOR: #000000">"</span>
														<span style="COLOR: #000000">验证错误</span>
														<span style="COLOR: #000000">"</span>
														<span style="COLOR: #000000">,JOptionPane.ERROR_MESSAGE);                <br /></span>
														<span style="COLOR: #008080">65</span>
														<span style="COLOR: #000000">
																<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />            }</span>
												</span>
												<span style="COLOR: #000000">
														<br />
												</span>
												<span style="COLOR: #008080">66</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
										</span>
										<span style="COLOR: #000000">
												<br />
										</span>
										<span style="COLOR: #008080">67</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">68</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
						</span>
				</span>
		</div>
<img src ="http://www.blogjava.net/zen/aggbug/76167.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zen/" target="_blank">迟到的鱼</a> 2006-10-19 15:03 <a href="http://www.blogjava.net/zen/archive/2006/10/19/76167.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>自扩展JTextField-1</title><link>http://www.blogjava.net/zen/archive/2006/10/19/76166.html</link><dc:creator>迟到的鱼</dc:creator><author>迟到的鱼</author><pubDate>Thu, 19 Oct 2006 07:02:00 GMT</pubDate><guid>http://www.blogjava.net/zen/archive/2006/10/19/76166.html</guid><wfw:comment>http://www.blogjava.net/zen/comments/76166.html</wfw:comment><comments>http://www.blogjava.net/zen/archive/2006/10/19/76166.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zen/comments/commentRss/76166.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zen/services/trackbacks/76166.html</trackback:ping><description><![CDATA[
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<img id="Code_Closed_Image_150122" onclick="this.style.display='none'; Code_Closed_Text_150122.style.display='none'; Code_Open_Image_150122.style.display='inline'; Code_Open_Text_150122.style.display='inline';" height="16" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" width="11" align="top" />
				<img id="Code_Open_Image_150122" style="DISPLAY: none" onclick="this.style.display='none'; Code_Open_Text_150122.style.display='none'; Code_Closed_Image_150122.style.display='inline'; Code_Closed_Text_150122.style.display='inline';" height="16" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" width="11" align="top" />
				<span id="Code_Closed_Text_150122" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
				</span>
				<span id="Code_Open_Text_150122" style="DISPLAY: none">
						<br />
						<!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>-->
						<span style="COLOR: #008080"> 1</span>
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<span style="COLOR: #0000ff">import</span>
						<span style="COLOR: #000000"> java.awt.</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 2</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">import</span>
						<span style="COLOR: #000000"> javax.swing.</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 3</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">import</span>
						<span style="COLOR: #000000"> javax.swing.text.</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 4</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">import</span>
						<span style="COLOR: #000000"> java.awt.event.</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 5</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
								<br />
						</span>
						<span style="COLOR: #008080"> 6</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">public</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">class</span>
						<span style="COLOR: #000000"> TextFieldDemo </span>
						<span style="COLOR: #0000ff">extends</span>
						<span style="COLOR: #000000"> JFrame<br /></span>
						<span style="COLOR: #008080"> 7</span>
						<span style="COLOR: #000000">
								<img id="Codehighlighter1_136_611_Open_Image" onclick="this.style.display='none'; Codehighlighter1_136_611_Open_Text.style.display='none'; Codehighlighter1_136_611_Closed_Image.style.display='inline'; Codehighlighter1_136_611_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
								<img id="Codehighlighter1_136_611_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_136_611_Closed_Text.style.display='none'; Codehighlighter1_136_611_Open_Image.style.display='inline'; Codehighlighter1_136_611_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />
						</span>
						<span id="Codehighlighter1_136_611_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_136_611_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080"> 8</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> TextFieldDemo()<br /></span>
								<span style="COLOR: #008080"> 9</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_166_515_Open_Image" onclick="this.style.display='none'; Codehighlighter1_166_515_Open_Text.style.display='none'; Codehighlighter1_166_515_Closed_Image.style.display='inline'; Codehighlighter1_166_515_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_166_515_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_166_515_Closed_Text.style.display='none'; Codehighlighter1_166_515_Open_Image.style.display='inline'; Codehighlighter1_166_515_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_166_515_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_166_515_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">10</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">11</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        Container contentPane</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #0000ff">this</span>
										<span style="COLOR: #000000">.getContentPane();<br /></span>
										<span style="COLOR: #008080">12</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">13</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        contentPane.setLayout(</span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> FlowLayout());      <br /></span>
										<span style="COLOR: #008080">14</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        DigitalText txtDigitalText </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> DigitalText(</span>
										<span style="COLOR: #000000">10</span>
										<span style="COLOR: #000000">,</span>
										<span style="COLOR: #000000">10</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080">15</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        contentPane.add(</span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> JLabel(</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">文本框</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">));<br /></span>
										<span style="COLOR: #008080">16</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        contentPane.add(txtDigitalText);<br /></span>
										<span style="COLOR: #008080">17</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />       <br /></span>
										<span style="COLOR: #008080">18</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">19</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        pack();<br /></span>
										<span style="COLOR: #008080">20</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        setVisible(</span>
										<span style="COLOR: #0000ff">true</span>
										<span style="COLOR: #000000">);<br /></span>
										<span style="COLOR: #008080">21</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<br /></span>
										<span style="COLOR: #008080">22</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">23</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">24</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">static</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">void</span>
								<span style="COLOR: #000000"> main(String args[]) <br /></span>
								<span style="COLOR: #008080">25</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_560_609_Open_Image" onclick="this.style.display='none'; Codehighlighter1_560_609_Open_Text.style.display='none'; Codehighlighter1_560_609_Closed_Image.style.display='inline'; Codehighlighter1_560_609_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_560_609_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_560_609_Closed_Text.style.display='none'; Codehighlighter1_560_609_Open_Image.style.display='inline'; Codehighlighter1_560_609_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_560_609_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_560_609_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">26</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />         TextFieldDemo frame </span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> TextFieldDemo();<br /></span>
										<span style="COLOR: #008080">27</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">28</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
						</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #008080">29</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">用户自定义类</span>
						<span style="COLOR: #008000">
								<br />
						</span>
						<span style="COLOR: #008080">30</span>
						<span style="COLOR: #008000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">class</span>
						<span style="COLOR: #000000"> DigitalText </span>
						<span style="COLOR: #0000ff">extends</span>
						<span style="COLOR: #000000"> JTextField <br /></span>
						<span style="COLOR: #008080">31</span>
						<span style="COLOR: #000000">
								<img id="Codehighlighter1_660_1365_Open_Image" onclick="this.style.display='none'; Codehighlighter1_660_1365_Open_Text.style.display='none'; Codehighlighter1_660_1365_Closed_Image.style.display='inline'; Codehighlighter1_660_1365_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
								<img id="Codehighlighter1_660_1365_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_660_1365_Closed_Text.style.display='none'; Codehighlighter1_660_1365_Open_Image.style.display='inline'; Codehighlighter1_660_1365_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />
						</span>
						<span id="Codehighlighter1_660_1365_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_660_1365_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080">32</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000"> len;<br /></span>
								<span style="COLOR: #008080">33</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> DigitalText(</span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000"> len)<br /></span>
								<span style="COLOR: #008080">34</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_708_730_Open_Image" onclick="this.style.display='none'; Codehighlighter1_708_730_Open_Text.style.display='none'; Codehighlighter1_708_730_Closed_Image.style.display='inline'; Codehighlighter1_708_730_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_708_730_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_708_730_Closed_Text.style.display='none'; Codehighlighter1_708_730_Open_Image.style.display='inline'; Codehighlighter1_708_730_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_708_730_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_708_730_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">35</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">this</span>
										<span style="COLOR: #000000">.len</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000">len;<br /></span>
										<span style="COLOR: #008080">36</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">37</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />       </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> DigitalText( </span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000"> column,</span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000"> len)<br /></span>
								<span style="COLOR: #008080">38</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_780_823_Open_Image" onclick="this.style.display='none'; Codehighlighter1_780_823_Open_Text.style.display='none'; Codehighlighter1_780_823_Closed_Image.style.display='inline'; Codehighlighter1_780_823_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_780_823_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_780_823_Closed_Text.style.display='none'; Codehighlighter1_780_823_Open_Image.style.display='inline'; Codehighlighter1_780_823_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_780_823_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_780_823_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">39</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">40</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">super</span>
										<span style="COLOR: #000000">(column);<br /></span>
										<span style="COLOR: #008080">41</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">this</span>
										<span style="COLOR: #000000">.len</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000">len;<br /></span>
										<span style="COLOR: #008080">42</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">43</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> DigitalText(String strText, </span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000"> column,</span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000"> len)<br /></span>
								<span style="COLOR: #008080">44</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_888_941_Open_Image" onclick="this.style.display='none'; Codehighlighter1_888_941_Open_Text.style.display='none'; Codehighlighter1_888_941_Closed_Image.style.display='inline'; Codehighlighter1_888_941_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_888_941_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_888_941_Closed_Text.style.display='none'; Codehighlighter1_888_941_Open_Image.style.display='inline'; Codehighlighter1_888_941_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_888_941_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_888_941_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">45</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">super</span>
										<span style="COLOR: #000000">(strText,column);<br /></span>
										<span style="COLOR: #008080">46</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">this</span>
										<span style="COLOR: #000000">.len</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000">len;<br /></span>
										<span style="COLOR: #008080">47</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">48</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">protected</span>
								<span style="COLOR: #000000"> Document createDefaultModel()<br /></span>
								<span style="COLOR: #008080">49</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_991_1039_Open_Image" onclick="this.style.display='none'; Codehighlighter1_991_1039_Open_Text.style.display='none'; Codehighlighter1_991_1039_Closed_Image.style.display='inline'; Codehighlighter1_991_1039_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_991_1039_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_991_1039_Closed_Text.style.display='none'; Codehighlighter1_991_1039_Open_Image.style.display='inline'; Codehighlighter1_991_1039_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_991_1039_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_991_1039_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">50</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">return</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #0000ff">new</span>
										<span style="COLOR: #000000"> DigitalTextDocument();<br /></span>
										<span style="COLOR: #008080">51</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">52</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    <br /></span>
								<span style="COLOR: #008080">53</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">class</span>
								<span style="COLOR: #000000"> DigitalTextDocument </span>
								<span style="COLOR: #0000ff">extends</span>
								<span style="COLOR: #000000"> PlainDocument <br /></span>
								<span style="COLOR: #008080">54</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_1094_1362_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1094_1362_Open_Text.style.display='none'; Codehighlighter1_1094_1362_Closed_Image.style.display='inline'; Codehighlighter1_1094_1362_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_1094_1362_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1094_1362_Closed_Text.style.display='none'; Codehighlighter1_1094_1362_Open_Image.style.display='inline'; Codehighlighter1_1094_1362_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_1094_1362_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_1094_1362_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">55</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">public</span>
										<span style="COLOR: #000000"> </span>
										<span style="COLOR: #0000ff">void</span>
										<span style="COLOR: #000000"> insertString( </span>
										<span style="COLOR: #0000ff">int</span>
										<span style="COLOR: #000000"> offs, String str, AttributeSet  a) </span>
										<span style="COLOR: #0000ff">throws</span>
										<span style="COLOR: #000000"> BadLocationException<br /></span>
										<span style="COLOR: #008080">56</span>
										<span style="COLOR: #000000">
												<img id="Codehighlighter1_1199_1359_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1199_1359_Open_Text.style.display='none'; Codehighlighter1_1199_1359_Closed_Image.style.display='inline'; Codehighlighter1_1199_1359_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
												<img id="Codehighlighter1_1199_1359_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1199_1359_Closed_Text.style.display='none'; Codehighlighter1_1199_1359_Open_Image.style.display='inline'; Codehighlighter1_1199_1359_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
										<span id="Codehighlighter1_1199_1359_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
												<img src="http://www.blogjava.net/images/dot.gif" />
										</span>
										<span id="Codehighlighter1_1199_1359_Open_Text">
												<span style="COLOR: #000000">{<br /></span>
												<span style="COLOR: #008080">57</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
												<span style="COLOR: #0000ff">if</span>
												<span style="COLOR: #000000">( str </span>
												<span style="COLOR: #000000">==</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">null</span>
												<span style="COLOR: #000000"> ) </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000">;           <br /></span>
												<span style="COLOR: #008080">58</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
												<span style="COLOR: #0000ff">if</span>
												<span style="COLOR: #000000">((</span>
												<span style="COLOR: #0000ff">this</span>
												<span style="COLOR: #000000">.getLength()</span>
												<span style="COLOR: #000000">+</span>
												<span style="COLOR: #000000">str.length())</span>
												<span style="COLOR: #000000">&gt;</span>
												<span style="COLOR: #000000">len)<br /></span>
												<span style="COLOR: #008080">59</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />               </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000">;<br /></span>
												<span style="COLOR: #008080">60</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
												<span style="COLOR: #0000ff">super</span>
												<span style="COLOR: #000000">.insertString(offs,str,a);<br /></span>
												<span style="COLOR: #008080">61</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
										</span>
										<span style="COLOR: #000000">
												<br />
										</span>
										<span style="COLOR: #008080">62</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">63</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">64</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
						</span>
				</span>
		</div>
<img src ="http://www.blogjava.net/zen/aggbug/76166.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zen/" target="_blank">迟到的鱼</a> 2006-10-19 15:02 <a href="http://www.blogjava.net/zen/archive/2006/10/19/76166.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>向量-2</title><link>http://www.blogjava.net/zen/archive/2006/10/19/76164.html</link><dc:creator>迟到的鱼</dc:creator><author>迟到的鱼</author><pubDate>Thu, 19 Oct 2006 06:58:00 GMT</pubDate><guid>http://www.blogjava.net/zen/archive/2006/10/19/76164.html</guid><wfw:comment>http://www.blogjava.net/zen/comments/76164.html</wfw:comment><comments>http://www.blogjava.net/zen/archive/2006/10/19/76164.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zen/comments/commentRss/76164.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zen/services/trackbacks/76164.html</trackback:ping><description><![CDATA[
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<img id="Code_Closed_Image_145719" onclick="this.style.display='none'; Code_Closed_Text_145719.style.display='none'; Code_Open_Image_145719.style.display='inline'; Code_Open_Text_145719.style.display='inline';" height="16" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" width="11" align="top" />
				<img id="Code_Open_Image_145719" style="DISPLAY: none" onclick="this.style.display='none'; Code_Open_Text_145719.style.display='none'; Code_Closed_Image_145719.style.display='inline'; Code_Closed_Text_145719.style.display='inline';" height="16" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" width="11" align="top" />
				<span id="Code_Closed_Text_145719" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
				</span>
				<span id="Code_Open_Text_145719" style="DISPLAY: none">
						<br />
						<!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>-->
						<span style="COLOR: #008080"> 1</span>
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<span style="COLOR: #0000ff">import</span>
						<span style="COLOR: #000000"> java.io.</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 2</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">import</span>
						<span style="COLOR: #000000"> java.util.</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 3</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
								<br />
						</span>
						<span style="COLOR: #008080"> 4</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">class</span>
						<span style="COLOR: #000000"> ReadVectorObj<br /></span>
						<span style="COLOR: #008080"> 5</span>
						<span style="COLOR: #000000">
								<img id="Codehighlighter1_59_565_Open_Image" onclick="this.style.display='none'; Codehighlighter1_59_565_Open_Text.style.display='none'; Codehighlighter1_59_565_Closed_Image.style.display='inline'; Codehighlighter1_59_565_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
								<img id="Codehighlighter1_59_565_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_59_565_Closed_Text.style.display='none'; Codehighlighter1_59_565_Open_Image.style.display='inline'; Codehighlighter1_59_565_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />
						</span>
						<span id="Codehighlighter1_59_565_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_59_565_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080"> 6</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">static</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">void</span>
								<span style="COLOR: #000000">  main (String[] args)<br /></span>
								<span style="COLOR: #008080"> 7</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_110_563_Open_Image" onclick="this.style.display='none'; Codehighlighter1_110_563_Open_Text.style.display='none'; Codehighlighter1_110_563_Closed_Image.style.display='inline'; Codehighlighter1_110_563_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_110_563_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_110_563_Closed_Text.style.display='none'; Codehighlighter1_110_563_Open_Image.style.display='inline'; Codehighlighter1_110_563_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_110_563_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_110_563_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080"> 8</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">try</span>
										<span style="COLOR: #000000">
												<br />
										</span>
										<span style="COLOR: #008080"> 9</span>
										<span style="COLOR: #000000">
												<img id="Codehighlighter1_132_469_Open_Image" onclick="this.style.display='none'; Codehighlighter1_132_469_Open_Text.style.display='none'; Codehighlighter1_132_469_Closed_Image.style.display='inline'; Codehighlighter1_132_469_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
												<img id="Codehighlighter1_132_469_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_132_469_Closed_Text.style.display='none'; Codehighlighter1_132_469_Open_Image.style.display='inline'; Codehighlighter1_132_469_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
										<span id="Codehighlighter1_132_469_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
												<img src="http://www.blogjava.net/images/dot.gif" />
										</span>
										<span id="Codehighlighter1_132_469_Open_Text">
												<span style="COLOR: #000000">{<br /></span>
												<span style="COLOR: #008080">10</span>
												<span style="COLOR: #000000">
														<img id="Codehighlighter1_150_176_Open_Image" onclick="this.style.display='none'; Codehighlighter1_150_176_Open_Text.style.display='none'; Codehighlighter1_150_176_Closed_Image.style.display='inline'; Codehighlighter1_150_176_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
														<img id="Codehighlighter1_150_176_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_150_176_Closed_Text.style.display='none'; Codehighlighter1_150_176_Open_Image.style.display='inline'; Codehighlighter1_150_176_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span>
												<span id="Codehighlighter1_150_176_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span>
												<span id="Codehighlighter1_150_176_Open_Text">
														<span style="COLOR: #008000">/*</span>
														<span style="COLOR: #008000"> 打开文件，读取Vector 存放的对象数据 </span>
														<span style="COLOR: #008000">*/</span>
												</span>
												<span style="COLOR: #000000">
														<br />
												</span>
												<span style="COLOR: #008080">11</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />                FileInputStream objfile </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">new</span>
												<span style="COLOR: #000000"> FileInputStream(</span>
												<span style="COLOR: #000000">"</span>
												<span style="COLOR: #000000">testvector.obj</span>
												<span style="COLOR: #000000">"</span>
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">12</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />                ObjectInputStream q </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">new</span>
												<span style="COLOR: #000000"> ObjectInputStream(objfile);<br /></span>
												<span style="COLOR: #008080">13</span>
												<span style="COLOR: #000000">
														<img id="Codehighlighter1_345_358_Open_Image" onclick="this.style.display='none'; Codehighlighter1_345_358_Open_Text.style.display='none'; Codehighlighter1_345_358_Closed_Image.style.display='inline'; Codehighlighter1_345_358_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
														<img id="Codehighlighter1_345_358_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_345_358_Closed_Text.style.display='none'; Codehighlighter1_345_358_Open_Image.style.display='inline'; Codehighlighter1_345_358_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                </span>
												<span id="Codehighlighter1_345_358_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span>
												<span id="Codehighlighter1_345_358_Open_Text">
														<span style="COLOR: #008000">/*</span>
														<span style="COLOR: #008000"> 获取对象原始数据 </span>
														<span style="COLOR: #008000">*/</span>
												</span>
												<span style="COLOR: #000000">
														<br />
												</span>
												<span style="COLOR: #008080">14</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />                TestVector myvector </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> (TestVector)q.readObject();<br /></span>
												<span style="COLOR: #008080">15</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />                myvector.print(); <br /></span>
												<span style="COLOR: #008080">16</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
										</span>
										<span style="COLOR: #000000">
												<br />
										</span>
										<span style="COLOR: #008080">17</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">catch</span>
										<span style="COLOR: #000000"> (Exception e) <br /></span>
										<span style="COLOR: #008080">18</span>
										<span style="COLOR: #000000">
												<img id="Codehighlighter1_508_557_Open_Image" onclick="this.style.display='none'; Codehighlighter1_508_557_Open_Text.style.display='none'; Codehighlighter1_508_557_Closed_Image.style.display='inline'; Codehighlighter1_508_557_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
												<img id="Codehighlighter1_508_557_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_508_557_Closed_Text.style.display='none'; Codehighlighter1_508_557_Open_Image.style.display='inline'; Codehighlighter1_508_557_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
										<span id="Codehighlighter1_508_557_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
												<img src="http://www.blogjava.net/images/dot.gif" />
										</span>
										<span id="Codehighlighter1_508_557_Open_Text">
												<span style="COLOR: #000000">{<br /></span>
												<span style="COLOR: #008080">19</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />                e.printStackTrace();  <br /></span>
												<span style="COLOR: #008080">20</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
										</span>
										<span style="COLOR: #000000">
												<br />
										</span>
										<span style="COLOR: #008080">21</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">22</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
						</span>
				</span>
		</div>
<img src ="http://www.blogjava.net/zen/aggbug/76164.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zen/" target="_blank">迟到的鱼</a> 2006-10-19 14:58 <a href="http://www.blogjava.net/zen/archive/2006/10/19/76164.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>向量-1</title><link>http://www.blogjava.net/zen/archive/2006/10/19/76162.html</link><dc:creator>迟到的鱼</dc:creator><author>迟到的鱼</author><pubDate>Thu, 19 Oct 2006 06:56:00 GMT</pubDate><guid>http://www.blogjava.net/zen/archive/2006/10/19/76162.html</guid><wfw:comment>http://www.blogjava.net/zen/comments/76162.html</wfw:comment><comments>http://www.blogjava.net/zen/archive/2006/10/19/76162.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/zen/comments/commentRss/76162.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/zen/services/trackbacks/76162.html</trackback:ping><description><![CDATA[
		<p> </p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<img id="Code_Closed_Image_145530" onclick="this.style.display='none'; Code_Closed_Text_145530.style.display='none'; Code_Open_Image_145530.style.display='inline'; Code_Open_Text_145530.style.display='inline';" height="16" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" width="11" align="top" />
				<img id="Code_Open_Image_145530" style="DISPLAY: none" onclick="this.style.display='none'; Code_Open_Text_145530.style.display='none'; Code_Closed_Image_145530.style.display='inline'; Code_Closed_Text_145530.style.display='inline';" height="16" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" width="11" align="top" />
				<span id="Code_Closed_Text_145530" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
				</span>
				<span id="Code_Open_Text_145530" style="DISPLAY: none">
						<br />
						<!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>-->
						<span style="COLOR: #008080"> 1</span>
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<span style="COLOR: #0000ff">import</span>
						<span style="COLOR: #000000"> java.io.</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 2</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">import</span>
						<span style="COLOR: #000000"> java.util.</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">;<br /></span>
						<span style="COLOR: #008080"> 3</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
								<br />
						</span>
						<span style="COLOR: #008080"> 4</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
						<span style="COLOR: #0000ff">class</span>
						<span style="COLOR: #000000"> TestVector </span>
						<span style="COLOR: #0000ff">implements</span>
						<span style="COLOR: #000000"> java.io.Serializable<br /></span>
						<span style="COLOR: #008080"> 5</span>
						<span style="COLOR: #000000">
								<img id="Codehighlighter1_88_966_Open_Image" onclick="this.style.display='none'; Codehighlighter1_88_966_Open_Text.style.display='none'; Codehighlighter1_88_966_Closed_Image.style.display='inline'; Codehighlighter1_88_966_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
								<img id="Codehighlighter1_88_966_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_88_966_Closed_Text.style.display='none'; Codehighlighter1_88_966_Open_Image.style.display='inline'; Codehighlighter1_88_966_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />
						</span>
						<span id="Codehighlighter1_88_966_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_88_966_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080"> 6</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">private</span>
								<span style="COLOR: #000000"> Vector vect</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #0000ff">new</span>
								<span style="COLOR: #000000"> Vector();<br /></span>
								<span style="COLOR: #008080"> 7</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    <br /></span>
								<span style="COLOR: #008080"> 8</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">void</span>
								<span style="COLOR: #000000"> add(Object obj)<br /></span>
								<span style="COLOR: #008080"> 9</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_169_207_Open_Image" onclick="this.style.display='none'; Codehighlighter1_169_207_Open_Text.style.display='none'; Codehighlighter1_169_207_Closed_Image.style.display='inline'; Codehighlighter1_169_207_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_169_207_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_169_207_Closed_Text.style.display='none'; Codehighlighter1_169_207_Open_Image.style.display='inline'; Codehighlighter1_169_207_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_169_207_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_169_207_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">10</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
										<span style="COLOR: #0000ff">this</span>
										<span style="COLOR: #000000">.vect.add(obj);<br /></span>
										<span style="COLOR: #008080">11</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">12</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">void</span>
								<span style="COLOR: #000000"> print()<br /></span>
								<span style="COLOR: #008080">13</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_237_286_Open_Image" onclick="this.style.display='none'; Codehighlighter1_237_286_Open_Text.style.display='none'; Codehighlighter1_237_286_Closed_Image.style.display='inline'; Codehighlighter1_237_286_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_237_286_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_237_286_Closed_Text.style.display='none'; Codehighlighter1_237_286_Open_Image.style.display='inline'; Codehighlighter1_237_286_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_237_286_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_237_286_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">14</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            System.out.println(</span>
										<span style="COLOR: #0000ff">this</span>
										<span style="COLOR: #000000">.vect);<br /></span>
										<span style="COLOR: #008080">15</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">16</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">static</span>
								<span style="COLOR: #000000"> </span>
								<span style="COLOR: #0000ff">void</span>
								<span style="COLOR: #000000"> main(String[] args)<br /></span>
								<span style="COLOR: #008080">17</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_335_964_Open_Image" onclick="this.style.display='none'; Codehighlighter1_335_964_Open_Text.style.display='none'; Codehighlighter1_335_964_Closed_Image.style.display='inline'; Codehighlighter1_335_964_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_335_964_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_335_964_Closed_Text.style.display='none'; Codehighlighter1_335_964_Open_Image.style.display='inline'; Codehighlighter1_335_964_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
								<span id="Codehighlighter1_335_964_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_335_964_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080">18</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">try</span>
										<span style="COLOR: #000000"> <br /></span>
										<span style="COLOR: #008080">19</span>
										<span style="COLOR: #000000">
												<img id="Codehighlighter1_358_875_Open_Image" onclick="this.style.display='none'; Codehighlighter1_358_875_Open_Text.style.display='none'; Codehighlighter1_358_875_Closed_Image.style.display='inline'; Codehighlighter1_358_875_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
												<img id="Codehighlighter1_358_875_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_358_875_Closed_Text.style.display='none'; Codehighlighter1_358_875_Open_Image.style.display='inline'; Codehighlighter1_358_875_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
										<span id="Codehighlighter1_358_875_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
												<img src="http://www.blogjava.net/images/dot.gif" />
										</span>
										<span id="Codehighlighter1_358_875_Open_Text">
												<span style="COLOR: #000000">{<br /></span>
												<span style="COLOR: #008080">20</span>
												<span style="COLOR: #000000">
														<img id="Codehighlighter1_372_387_Open_Image" onclick="this.style.display='none'; Codehighlighter1_372_387_Open_Text.style.display='none'; Codehighlighter1_372_387_Closed_Image.style.display='inline'; Codehighlighter1_372_387_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
														<img id="Codehighlighter1_372_387_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_372_387_Closed_Text.style.display='none'; Codehighlighter1_372_387_Open_Image.style.display='inline'; Codehighlighter1_372_387_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            </span>
												<span id="Codehighlighter1_372_387_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span>
												<span id="Codehighlighter1_372_387_Open_Text">
														<span style="COLOR: #008000">/*</span>
														<span style="COLOR: #008000"> 将对象写到一个文件里 </span>
														<span style="COLOR: #008000">*/</span>
												</span>
												<span style="COLOR: #000000">
														<br />
												</span>
												<span style="COLOR: #008080">21</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            FileOutputStream objfile </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">new</span>
												<span style="COLOR: #000000"> FileOutputStream(</span>
												<span style="COLOR: #000000">"</span>
												<span style="COLOR: #000000">testvector.obj</span>
												<span style="COLOR: #000000">"</span>
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">22</span>
												<span style="COLOR: #000000">
														<img id="Codehighlighter1_480_492_Open_Image" onclick="this.style.display='none'; Codehighlighter1_480_492_Open_Text.style.display='none'; Codehighlighter1_480_492_Closed_Image.style.display='inline'; Codehighlighter1_480_492_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
														<img id="Codehighlighter1_480_492_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_480_492_Closed_Text.style.display='none'; Codehighlighter1_480_492_Open_Image.style.display='inline'; Codehighlighter1_480_492_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            </span>
												<span id="Codehighlighter1_480_492_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span>
												<span id="Codehighlighter1_480_492_Open_Text">
														<span style="COLOR: #008000">/*</span>
														<span style="COLOR: #008000"> 创建一个输出流 </span>
														<span style="COLOR: #008000">*/</span>
												</span>
												<span style="COLOR: #000000">
														<br />
												</span>
												<span style="COLOR: #008080">23</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            ObjectOutputStream p </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #000000"> </span>
												<span style="COLOR: #0000ff">new</span>
												<span style="COLOR: #000000"> ObjectOutputStream(objfile);<br /></span>
												<span style="COLOR: #008080">24</span>
												<span style="COLOR: #000000">
														<img id="Codehighlighter1_574_595_Open_Image" onclick="this.style.display='none'; Codehighlighter1_574_595_Open_Text.style.display='none'; Codehighlighter1_574_595_Closed_Image.style.display='inline'; Codehighlighter1_574_595_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
														<img id="Codehighlighter1_574_595_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_574_595_Closed_Text.style.display='none'; Codehighlighter1_574_595_Open_Image.style.display='inline'; Codehighlighter1_574_595_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            </span>
												<span id="Codehighlighter1_574_595_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span>
												<span id="Codehighlighter1_574_595_Open_Text">
														<span style="COLOR: #008000">/*</span>
														<span style="COLOR: #008000"> 创建一个TestVector对象 </span>
														<span style="COLOR: #008000">*/</span>
												</span>
												<span style="COLOR: #000000">
														<br />
												</span>
												<span style="COLOR: #008080">25</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            TestVector tv </span>
												<span style="COLOR: #000000">=</span>
												<span style="COLOR: #0000ff">new</span>
												<span style="COLOR: #000000"> TestVector();<br /></span>
												<span style="COLOR: #008080">26</span>
												<span style="COLOR: #000000">
														<img id="Codehighlighter1_654_676_Open_Image" onclick="this.style.display='none'; Codehighlighter1_654_676_Open_Text.style.display='none'; Codehighlighter1_654_676_Closed_Image.style.display='inline'; Codehighlighter1_654_676_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
														<img id="Codehighlighter1_654_676_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_654_676_Closed_Text.style.display='none'; Codehighlighter1_654_676_Open_Image.style.display='inline'; Codehighlighter1_654_676_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            </span>
												<span id="Codehighlighter1_654_676_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span>
												<span id="Codehighlighter1_654_676_Open_Text">
														<span style="COLOR: #008000">/*</span>
														<span style="COLOR: #008000">给Vector写入几String个对象</span>
														<span style="COLOR: #008000">*/</span>
												</span>
												<span style="COLOR: #000000">
														<br />
												</span>
												<span style="COLOR: #008080">27</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            tv.add(</span>
												<span style="COLOR: #000000">"</span>
												<span style="COLOR: #000000">One</span>
												<span style="COLOR: #000000">"</span>
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">28</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            tv.add(</span>
												<span style="COLOR: #000000">"</span>
												<span style="COLOR: #000000">Two</span>
												<span style="COLOR: #000000">"</span>
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">29</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            tv.add(</span>
												<span style="COLOR: #000000">"</span>
												<span style="COLOR: #000000">Three</span>
												<span style="COLOR: #000000">"</span>
												<span style="COLOR: #000000">);<br /></span>
												<span style="COLOR: #008080">30</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            p.writeObject(tv); </span>
												<span style="COLOR: #008000">//</span>
												<span style="COLOR: #008000"> 把tv写入流</span>
												<span style="COLOR: #008000">
														<br />
												</span>
												<span style="COLOR: #008080">31</span>
												<span style="COLOR: #008000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
												</span>
												<span style="COLOR: #000000">            p.flush();<br /></span>
												<span style="COLOR: #008080">32</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            objfile.close();    </span>
												<span style="COLOR: #008000">//</span>
												<span style="COLOR: #008000"> 关闭文件对象</span>
												<span style="COLOR: #008000">
														<br />
												</span>
												<span style="COLOR: #008080">33</span>
												<span style="COLOR: #008000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />
												</span>
												<span style="COLOR: #000000">        }</span>
										</span>
										<span style="COLOR: #000000"> <br /></span>
										<span style="COLOR: #008080">34</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
										<span style="COLOR: #0000ff">catch</span>
										<span style="COLOR: #000000"> (Exception e) <br /></span>
										<span style="COLOR: #008080">35</span>
										<span style="COLOR: #000000">
												<img id="Codehighlighter1_915_958_Open_Image" onclick="this.style.display='none'; Codehighlighter1_915_958_Open_Text.style.display='none'; Codehighlighter1_915_958_Closed_Image.style.display='inline'; Codehighlighter1_915_958_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
												<img id="Codehighlighter1_915_958_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_915_958_Closed_Text.style.display='none'; Codehighlighter1_915_958_Open_Image.style.display='inline'; Codehighlighter1_915_958_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
										<span id="Codehighlighter1_915_958_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
												<img src="http://www.blogjava.net/images/dot.gif" />
										</span>
										<span id="Codehighlighter1_915_958_Open_Text">
												<span style="COLOR: #000000">{<br /></span>
												<span style="COLOR: #008080">36</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />            e.printStackTrace();<br /></span>
												<span style="COLOR: #008080">37</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
										</span>
										<span style="COLOR: #000000">
												<br />
										</span>
										<span style="COLOR: #008080">38</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">39</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
						</span>
				</span>
		</div>
<img src ="http://www.blogjava.net/zen/aggbug/76162.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/zen/" target="_blank">迟到的鱼</a> 2006-10-19 14:56 <a href="http://www.blogjava.net/zen/archive/2006/10/19/76162.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>