📄 index.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><html> <head> <title>Trail: Creating a GUI with JFC/Swing (The Java™ Tutorials)</title><style type="text/css"> .FigureCaption { margin-left: 1in; margin-right: 1in; font-family: sans-serif; font-size: smaller; text-align: justify; } #TopBar_bl { background: url(../images/java_bar_bl.gif) 0 100% no-repeat; width: 100%; height: 60px; } #TopBar_br { background: url(../images/java_bar_br.gif) 100% 100% no-repeat; width: 100%; height: 60px; } #TopBar_tl { background: url(../images/java_bar_tl.gif) 0 0 no-repeat; width: 100%; height: 60px; } #TopBar_tr { background: url(../images/java_bar_tr.gif) 100% 0 no-repeat; width: 100%; height: 60px; } #TopBar { background: #35556B url(../images/java_bar.gif); margin: 10px 10px 0 10px; height:60px; min-width:700px; color: white; font-family: sans-serif; font-weight: bold; } @media print { #BreadCrumbs, #Download { display: none; } } #TopBar_right { line-height: 14px; float: right; padding-top: 2px; padding-right: 30px; text-align: center; } @media print { #TopBar_right { display: none; } } #TopBar_right a { font-size: 12px; margin: 3px; padding: 0; } #TopBar a:visited, #TopBar a:link { color: white; text-decoration: none; } #TopBar a:hover, #TopBar a:active { background-color: white; color: #35556B; } #BreadCrumbs { padding: 4px 5px 0.5em 0; font-family: sans-serif; float: right; } #BreadCrumbs a { color: blue; } #BreadCrumbs a:visited, #BreadCrumbs a:link { text-decoration: none; } #BreadCrumbs a:hover, #BreadCrumbs a:active { text-decoration: underline; } #PageTitle { margin: 0 5px 0.5em 0; color: #E76F00; font-family: sans-serif; font-weight: bold; font-size: 20px; } .LeftBar_shown { width: 13em; float: left; margin-left: 10px; margin-top: 4px; margin-bottom: 2em; } @media print { .LeftBar_shown { display: none; } } .LeftBar_hidden { display: none; } #Footer { padding-top: 10px; padding-left: 10px; margin-right: 10px; } .NavBit { padding: 4px 5px 0.5em 0; font-family: sans-serif; } @media print { .NavBit { display: none; } } #TagNotes { text-align: right; font-size: smaller; font-family: sans-serif; } @media print { #TagNotes a:visited, #TagNotes a:link { color: #35556B; text-decoration: none; } } #Contents a, .NavBit a, #TagNotes a { color: blue } #TagNotes a:visited, #TagNotes a:link, #Contents a:visited, #Contents a:link, .NavBit a:visited, .NavBit a:link { text-decoration: none; } #TagNotes a:hover, #TagNotes a:active, #Contents a:hover, #Contents a:active, .NavBit a:hover, .NavBit a:active { text-decoration: underline; } #Contents { float: left; font-family: sans-serif; } @media print { #Contents { display: none; } } @media screen { div.PrintHeaders { display: none; } } .linkLESSON, .nolinkLESSON { margin-left: 0.5em; text-indent: -0.5em } .linkAHEAD, .nolinkAHEAD, .linkQUESTIONS, .nolinkQUESTIONS { margin-left: 1.5em; text-indent: -0.5em } .linkBHEAD, .nolinkBHEAD { margin-left: 2.5em; text-indent: -0.5em } .linkCHEAD, .nolinkCHEAD { margin-left: 3.5em; text-indent: -0.5em } .nolinkLESSON, .nolinkAHEAD, .nolinkBHEAD, .nolinkCHEAD, .nolinkQUESTIONS { font-weight: bold; color: #E76F00; } .MainFlow_indented { margin-right: 10px; margin-left: 15em; margin-bottom: 2em; } .MainFlow_wide { margin-right: 10px; margin-left: 10px; margin-bottom: 2em; } @media print { .MainFlow_indented, .MainFlow_wide { padding-top: 0; margin-top: 10px; margin-right: 10px; margin-left: 0; } } h3, h4, h5 { color: #E76F00; font-family: sans-serif; } #ToggleLeft { display: none; } /t</style> </head><body> <div id=TopBar> <div id=TopBar_tr> <div id=TopBar_tl> <div id=TopBar_br> <div id=TopBar_bl> <div id=TopBar_right> <a target="_blank" href="http://java.sun.com/javase/6/download.jsp">Download the JDK</a> <br> <a href="../search.html" target="_blank">Search the Tutorials</a> </div> </div> </div> </div> </div> </div> <div class=MainFlow_wide> <div id=BreadCrumbs> <a href=../index.html target=_top>Home Page</a> </div> <div class=NavBit> <a href=../index.html>« Previous</a> • <a href=./TOC.html>Trail</a> • <a href=./start/index.html>Next »</a> </div> <div id=PageTitle>Trail: Creating a GUI with JFC/Swing</div> <blockquote><h4> <font color="#000099" face="Arial, Helvetica" size=-1><em><font color="#999999">Also known as</font> The Swing Tutorial</em></font></h4><blockquote><hr><strong>We are in the process of updating this section to reflect featuresand conventions of the latest release, JDK 6.0. The subsectionsindicate what areas have been updated.</strong><hr></blockquote>This trail tells you how to create graphical user interfaces (GUIs)for applications and applets, using the Swing components.<!-- GETTING STARTED --><p><a href="./start/index.html"><img src=../images/uiIcon.gif align=left width=20 height=20 border=0><b>Getting Started with Swing</b></a>is a quick start lesson.First it gives you a bit of background about the JFCand Swing.Then it tells you how to compileand run programs that use Swing components.Next, it shows you how to run programs using Java Web Start.<!-- OVERVIEW --><p><a href="./learn/index.html"><img src=../images/uiIcon.gif align=left width=20 height=20 border=0><b>Learning Swing by Example</b></a>explains the concepts you need to use Swing components in building a user interface. It is built around several progressively complicated examples,so you'll learn the basics by examining code samples.<!-- COMPONENTS --><p><a href="./components/index.html"><img src=../images/uiIcon.gif align=left width=20 height=20 border=0><b>Using Swing Components</b></a>tells you how to use each of the Swing components —buttons, tables, text components, and all the rest.<!-- CONCURRENCY --><p><a href="./concurrency/index.html"><img src=../images/uiIcon.gif align=left width=20 height=20 border=0><b>Concurrency in Swing</b></a>discusses concurrency as it applies to Swing programming.Information on the event dispatch thread and the SwingWorker class areincluded.<!-- MISC --><p><a href="./misc/index.html"><img src=../images/uiIcon.gif align=left width=20 height=20 border=0><b>Using Other Swing Features</b></a>tells you how to use actions, borders, icons, and timers.It also helps you to create multithreaded programs.<!-- LAYOUT --><p><a href="./layout/index.html"><img src=../images/uiIcon.gif align=left width=20 height=20 border=0><b>Laying Out Components Within a Container</b></a>tells you how to choose a layout manager,how to use each of the layout manager classes theJava<sup><font size=-2>TM</font></sup> platform provides,how to use absolute positioning instead of a layout manager,and how to create your own layout manager.<!-- LOOKANDFEEL --><p><a href="./lookandfeel/index.html"><img src=../images/uiIcon.gif align=left width=20 height=20 border=0><b>Modifying the Look and Feel</b></a>tells you how to specify the look and feel of Swing components.<!-- DND ---><p><a href="./dnd/index.html"><img src=../images/uiIcon.gif align=left width=20 height=20 border=0><b>Drag and Drop and Data Transfer</b></a>tells you what you need to know to implement data transferin your application.<!-- EVENTS --><p><a href="./events/index.html"><img src=../images/uiIcon.gif align=left width=20 height=20 border=0><b>Writing Event Listeners</b></a>tells you how to handle events in your programs.<!-- GRAPHICS --><p><a href="./painting/index.html"><img src=../images/uiIcon.gif align=left width=20 height=20 border=0><b>Performing Custom Painting</b></a>gives you information on painting your own Swing components.It discusses painting issuesspecific to Swing components,provides an overview of painting concepts,and has examples of custom componentsthat paint themselves.<p><h3>Other UI-Related Trails</h3>Although this is the main trail for learning about GUIs,it isn't the only trail with UI-related information.<ul><li><a class="TutorialLink" target="_top" href="../2d/index.html">2D Graphics</a>,which describes the 2D graphics features available in the JDK.<li><a class="TutorialLink" target="_top" href="../sound/index.html">Sound</a>,which discusses the sound capabilities available in the JDK.<li><a class="TutorialLink" target="_top" href="../deployment/applet/index.html">Applets</a>,which describes API available only to applets.<li><a class="TutorialLink" target="_top" href="../essential/index.html">Essential Classes</a>,which covers many topics, including properties andthe standard I/O streams.<li>The Bonus trail contains<a class="TutorialLink" target="_top" href="../extra/fullscreen/index.html">Full-Screen Exclusive Mode API</a>, a lesson that describes how to use API introduced in v1.4to render graphics directly to the screen.</ul> </blockquote> <div class=NavBit> <a href=../index.html>« Previous</a> • <a href=./TOC.html>TOC</a> • <a href=./start/index.html>Next »</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> Beginning of Tutorial <br><b>Next page:</b> Getting Started with Swing </div> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -