index.html

来自「jsf、swing的官方指南」· HTML 代码 · 共 644 行 · 第 1/2 页

HTML
644
字号
containing the class files for this lesson's examples.Afterward, the examples should execute more quickly.If you have trouble using Java Web Start, see<a class="TutorialLink" target="_top" href="../../../information/javawebstart.html">Installing and Using Java Web Start</a>.</blockquote><h4>Compiling and Running the Examples Locally</h4><blockquote><blockquote><hr><strong>Note:</strong>&nbsp;Examples are all applications.See <a class="TutorialLink" target="_top" href="../../../uiswing/start/index.html">Getting Started with Swing</a> for details about releases and  instructions on compiling and running programs.<hr></blockquote>You can get the source, image, and other files requiredfor all these examples by downloading the<a class="OutsideLink" target="_blank" href="http://java.sun.com/docs/books/tutorial/information/download.html#egs">Tutorial Examples bundle</a>, which contains the files in the correct hierarchy.If you download an individual example,take care to have all the necessary files in the proper hierarchy when you compile and run it.For example, many examplesexpect their image filesto be in a directory named <code>images</code>that's in the same directory as the example's class files.<p>You can find out which files each example needs by consulting thefollowing table or by looking at the comments at the beginning ofeach source file.</blockquote><a name="table"><h4>Table of Examples</h4></a><p><table border="1" summary="Table of 1.4 layout examples"><tr><th scope="col"><strong>Example<th scope="col"><strong>Source Files<br><em>(first file has the main method)</em></td><th scope="col"><strong>Image and Other Files</strong></td><th scope="col"><strong>Where Described</td></tr><tr><td scope="row"><a name="AbsoluteLayoutDemo">AbsoluteLayoutDemo <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/AbsoluteLayoutDemo.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="AbsoluteLayoutDemo.java"><code>AbsoluteLayoutDemo.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../none.html">    Doing Without a Layout Manager</a></td></tr><tr><td scope="row"><a name="BorderLayoutDemo">BorderLayoutDemo <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/BorderLayoutDemo.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="BorderLayoutDemo.java"><code>BorderLayoutDemo.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../border.html">    How to Use BorderLayout</a></td></tr><tr><td scope="row"><a name="BoxAlignmentDemo">BoxAlignmentDemo <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/BoxAlignmentDemo.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="BoxAlignmentDemo.java"><code>BoxAlignmentDemo.java</code></a>    </a></td><td><a href="images/geek-cght.gif"><code>geek-cght.gif</code></a>    <a href="images/middle.gif"><code>middle.gif</code></a></td><td><a href="../box.html">    How to Use BoxLayout</a></td></tr><tr><td scope="row"><a name="BoxLayoutDemo">BoxLayoutDemo <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/BoxLayoutDemo.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="BoxLayoutDemo.java"><code>BoxLayoutDemo.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../box.html">    How to Use BoxLayout</a></td></tr><tr><td scope="row"><a name="BoxLayoutDemo2">BoxLayoutDemo2 <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/BoxLayoutDemo2.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="BoxLayoutDemo2.java"><code>BoxLayoutDemo2.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../box.html">    How to Use BoxLayout</a></td></tr><tr><td scope="row"><a name="CardLayoutDemo">CardLayoutDemo <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/CardLayoutDemo.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="CardLayoutDemo.java"><code>CardLayoutDemo.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../card.html">    How to Use CardLayout</a></td></tr><tr><td scope="row"><a name="CustomLayoutDemo">CustomLayoutDemo <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/CustomLayoutDemo.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="CustomLayoutDemo.java"><code>CustomLayoutDemo.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../custom.html">    Creating a Custom Layout Manager</a></td></tr><tr><td scope="row"><a name="FlowLayoutDemo">FlowLayoutDemo <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/FlowLayoutDemo.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="FlowLayoutDemo.java"><code>FlowLayoutDemo.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../flow.html">    How to Use FlowLayout</a></td></tr><tr><td scope="row"><a name="GraphPaperTest">GraphPaperTest <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/GraphPaperTest.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="GraphPaperTest.java"><code>GraphPaperTest.java</code></a><br>&nbsp;&nbsp;<a class="SourceLink" target="_blank" href="GraphPaperLayout.java"><code>GraphPaperLayout.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../custom.html">    Creating a Custom Layout Manager</a></td></tr><tr><td scope="row"><a name="GridBagLayoutDemo">GridBagLayoutDemo <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/GridBagLayoutDemo.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="GridBagLayoutDemo.java"><code>GridBagLayoutDemo.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../gridbag.html">    How to Use GridBagLayout</a></td></tr><tr><td scope="row"><a name="GridLayoutDemo">GridLayoutDemo <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/GridLayoutDemo.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="GridLayoutDemo.java"><code>GridLayoutDemo.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../grid.html">    How to Use GridLayout</a></td></tr><tr><td scope="row"><a name="SpringBox">SpringBox <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/SpringBox.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="SpringBox.java"><code>SpringBox.java</code></a><br>&nbsp;&nbsp;<a class="SourceLink" target="_blank" href="SpringUtilities.java"><code>SpringUtilities.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../spring.html">    How to Use SpringLayout</a></td></tr><tr><td scope="row"><a name="SpringCompactGrid">SpringCompactGrid <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/SpringCompactGrid.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="SpringCompactGrid.java"><code>SpringCompactGrid.java</code></a><br>&nbsp;&nbsp;<a class="SourceLink" target="_blank" href="SpringUtilities.java"><code>SpringUtilities.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../spring.html">    How to Use SpringLayout</a></td></tr><tr><td scope="row"><a name="SpringDemo1">    SpringDemo1     </a>     <a href="#dontrun">*</a></td><td><a class="SourceLink" target="_blank" href="SpringDemo1.java"><code>SpringDemo1.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../spring.html">    How to Use SpringLayout</a></td></tr><tr><td scope="row"><a name="SpringDemo2">    SpringDemo2     </a>     <a href="#dontrun">*</a></td><td><a class="SourceLink" target="_blank" href="SpringDemo2.java"><code>SpringDemo2.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../spring.html">    How to Use SpringLayout</a></td></tr><tr><td scope="row"><a name="SpringDemo3">SpringDemo3 <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/SpringDemo3.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="SpringDemo3.java"><code>SpringDemo3.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../spring.html">    How to Use SpringLayout</a></td></tr><tr><td scope="row"><a name="SpringDemo4">SpringDemo4 <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/SpringDemo4.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="SpringDemo4.java"><code>SpringDemo4.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../spring.html">    How to Use SpringLayout</a></td></tr><tr><td scope="row"><a name="SpringForm">SpringForm <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/SpringForm.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="SpringForm.java"><code>SpringForm.java</code></a><br>&nbsp;&nbsp;<a class="SourceLink" target="_blank" href="SpringUtilities.java"><code>SpringUtilities.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../spring.html">    How to Use SpringLayout</a></td></tr><tr><td scope="row"><a name="SpringGrid">SpringGrid <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/SpringGrid.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="SpringGrid.java"><code>SpringGrid.java</code></a><br>&nbsp;&nbsp;<a class="SourceLink" target="_blank" href="SpringUtilities.java"><code>SpringUtilities.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../spring.html">    How to Use SpringLayout</a></td></tr><tr><td scope="row"><a name="TabDemo">TabDemo <a href="http://java.sun.com/docs/books/tutorialJWS/uiswing/layout/examples/TabDemo.jnlp"><em>[Run]</em></a>     </a></td><td><a class="SourceLink" target="_blank" href="TabDemo.java"><code>TabDemo.java</code></a>    </a></td><td>&nbsp;</td><td><a href="../card.html">    How to Use CardLayout</a></td></tr></table></a><a name="dontrun">*</a>SpringDemo1 and SpringDemo2 are intentionally broken,and we don't advise running them using Java Web Start.</p>        </blockquote>        <div class=NavBit>            <a target=_top href=../../misc/examples/index.html>&laquo; Previous</a>            &bull;            <a target=_top href=../../TOC.html>Trail</a>            &bull;            <a target=_top href=../../events/examples/index.html>Next &raquo;</a>        </div>    </div>    <div id=Footer><div id=TagNotes>    Problems with the examples? Try <a target="_blank"        href=../../../information/run-examples.html>Compiling and Running        the Examples: FAQs</a>.    <br>    Complaints? Compliments? Suggestions? <a target="_blank"        href="http://developer.sun.com/contact/tutorial_feedback.jsp">Give    us your feedback</a>.<br><br>    <a target="_blank" href="../../../information/copyright.html">Copyright</a>    1995-2006 Sun Microsystems, Inc.  All rights reserved.    <span id=Download></span></div>     </div>    <div class=PrintHeaders>        <b>Previous page:</b>         <br><b>Next page:</b>     </div>    </body></html> 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?