📄 about.html
字号:
contents.className = "LeftBar_hidden"; main.className = "MainFlow_wide"; toggle.innerHTML = "Show the TOC"; document.cookie = 'tutorial_showLeftBar=no; path=/'; } } function toggleLeft() { showLeft(document.getElementById("LeftBar").className == "LeftBar_hidden"); document.getElementById("ToggleLeft").blur(); } function load() { showLeft(leftBar()); document.getElementById("ToggleLeft").style.display="inline"; } </script> </head><body onload="load()"> <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> <br> <a href="javascript:toggleLeft()" id="ToggleLeft">Hide the TOC</a> </div> </div> </div> </div> </div> </div> <div class=PrintHeaders> <b>Trail:</b> Creating a GUI with JFC/Swing <br><b>Lesson:</b> Getting Started with Swing </div> <div id=LeftBar class=LeftBar_shown> <div id=Contents> <div class="linkLESSON"><a href="index.html">Getting Started with Swing</a></div><div class="nolinkAHEAD">About the JFC and Swing</div><div class="linkAHEAD"><a href="compile.html">Compiling and Running Swing Programs</a></div></div> </div> <div id=MainFlow class=MainFlow_indented> <span id=BreadCrumbs> <a href=../../index.html target=_top>Home Page</a> > <a href=../index.html target=_top>Creating a GUI with JFC/Swing</a> > <a href=index.html target=_top>Getting Started with Swing</a> </span> <div class=NavBit> <a target=_top href=index.html>« Previous</a> • <a target=_top href=../TOC.html>Trail</a> • <a target=_top href=compile.html>Next »</a> </div> <div id=PageTitle>About the JFC and Swing</div> <blockquote>JFC is short for Java Foundation Classes, which encompass a group offeatures for building graphical user interfaces (GUIs) and adding richgraphics functionality and interactivity to Java applications.It is defined as containing the features shown in the table below. <blockquote><TABLE BORDER="1" CELLSPACING="2" CELLPADDING="0"> <CAPTION ALIGN="TOP"></CAPTION> <TR> <TD COLSPAN="2"> <P CLASS="TCH-Table-Column-Head"><CENTER><B>Features of the Java Foundation Classes</B></CENTER></TD> </TR> <TR> <TD WIDTH="144"> <B>Feature</B></TD> <TD WIDTH="649"> <B>Description</B></TD> </TR> <TR> <TD WIDTH="144"> <P CLASS="TAB-Table-Body">Swing GUI Components</TD> <TD WIDTH="649"> <P CLASS="TAB-Table-Body">Includes everything from buttons to split panes to tables. </TD> </TR> <TR> <TD WIDTH="144"> <P CLASS="TAB-Table-Body">Pluggable Look-and-Feel Support</TD> <TD WIDTH="649"> <P CLASS="TAB-Table-Body">Gives any program that uses Swing components a choice of look and feel. For example, the same program can use either the Java or the Windows look and feel. Many more look-and-feel packages are available from various sources. As of v1.4.2, the Java platform supports the GTK+ look and feel, which makes hundreds of existing look and feels available to Swing programs.</TD> </TR> <TR> <TD WIDTH="144"> <P CLASS="TAB-Table-Body">Accessibility API</TD> <TD WIDTH="649"> <P CLASS="TAB-Table-Body">Enables assistive technologies, such as screen readers and Braille displays, to get information from the user interface.</TD> </TR> <TR> <TD WIDTH="144"> <P CLASS="TAB-Table-Body">Java 2D API</TD> <TD WIDTH="649"> <P CLASS="TAB-Table-Body">Enables developers to easily incorporate high-quality 2D graphics, text, and images in applications and applets. Java 2D includes extensive APIs for generating and sending high-quality output to printing devices.</TD> </TR> <TR> <TD WIDTH="144"> <P CLASS="TAB-Table-Body">Drag-and-Drop Support</TD> <TD WIDTH="649"> <P CLASS="TAB-Table-Body">Provides the ability to drag and drop between Java applications and native applications.</TD> </TR> <TR> <TD WIDTH="144"> <P CLASS="TAB-Table-Body">Internationalization</TD> <TD WIDTH="649"> <P CLASS="TAB-Table-Body">Allows developers to build applications that can interact with users worldwide in their own languages and cultural conventions. With the input method framework developers can build applications that accept text in languages that use thousands of different characters, such as Japanese, Chinese, or Korean.</TD> </TR></TABLE></blockquote>This trail concentrates on the Swing components. We help you choose the appropriate components for your GUI, tell you how to use them, and give you the background information you need to use them effectively. We also discuss other JFC features as they apply to Swing components.<blockquote><hr><strong>Version Note:</strong> "Swing" was the code name of the project that developed the new components. Although unofficial, it's frequently used to refer to the new components and related API. "Swing" is immortalized in the package names for the Swing API, which begin with <code>javax.swing</code>. <hr></blockquote></blockquote><H3>Which Swing Packages Should I Use?</H3><blockquote>The Swing API is powerful, flexible--and immense. In release 1.4 of the Java platform, the Swing API has 17 public packages:<blockquote><TABLE BORDER="0" CELLSPACING="2" CELLPADDING="2"WIDTH="100%"> <TR> <TD WIDTH="172"> <P CLASS="TCH-Table-Column-Head1"><CODE>javax.accessibility</CODE></TD> <TD WIDTH="150"> <P CLASS="TCH-Table-Column-Head1"><CODE>javax.swing.plaf</CODE></TD> <TD WIDTH="157"> <P CLASS="TCH-Table-Column-Head1"><CODE>javax.swing.text.html</CODE></TD> </TR> <TR> <TD WIDTH="172"> <P CLASS="TCH-Table-Column-Head1"><CODE>javax.swing</CODE></TD> <TD WIDTH="150"> <P CLASS="TCH-Table-Column-Head1"><CODE>javax.swing.plaf.basic</CODE></TD> <TD WIDTH="157"> <P CLASS="TCH-Table-Column-Head1"><CODE>javax.swing.text.parser</CODE></TD> </TR> <TR> <TD WIDTH="172"> <P CLASS="TCH-Table-Column-Head1"><CODE>javax.swing.border</CODE></TD> <TD WIDTH="150"> <P CLASS="TCH-Table-Column-Head1"><CODE>javax.swing.plaf.metal</CODE></TD> <TD WIDTH="157"> <P CLASS="TCH-Table-Column-Head1"><CODE>javax.swing.text.rtf</CODE></TD> </TR> <TR> <TD WIDTH="172"> <P CLASS="TCH-Table-Column-Head1"><CODE>javax.swing.colorchooser</CODE></TD> <TD WIDTH="150"> <P CLASS="TCH-Table-Column-Head1"><CODE>javax.swing.plaf.multi</CODE></TD> <TD WIDTH="157"> <P CLASS="TCH-Table-Column-Head1"><CODE>javax.swing.tree</CODE></TD> </TR> <TR> <TD WIDTH="172"> <P CLASS="TCH-Table-Column-Head1"><CODE>javax.swing.event</CODE></TD> <TD WIDTH="150"> <P CLASS="TCH-Table-Column-Head1"><CODE>javax.swing.table</CODE></TD> <TD WIDTH="157"> <P CLASS="TCH-Table-Column-Head1"><CODE>javax.swing.undo</CODE></TD> </TR> <TR> <TD WIDTH="172"> <P CLASS="TCH-Table-Column-Head1"><CODE>javax.swing.filechooser</CODE></TD> <TD WIDTH="150"> <P CLASS="TCH-Table-Column-Head1"><CODE>javax.swing.text</CODE></TD> <TD WIDTH="157"> <P CLASS="TCH-Table-Column-Head"> </TD> </TR></TABLE></blockquote>Fortunately, most programs use only a small subset of the API. This trail sorts out the API for you, giving you examples of common code and pointing you to methods and classes you're likely to need. Most of the code in this trail uses only one or two Swing packages:<UL> <LI><code>javax.swing</code> <LI><code>javax.swing.event</code> (not always required) </UL></blockquote> </blockquote> <div class=NavBit> <a target=_top href=index.html>« Previous</a> • <a target=_top href=../TOC.html>Trail</a> • <a target=_top href=compile.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> Getting Started with Swing <br><b>Next page:</b> Compiling and Running Swing Programs </div> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -