⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jcomponent.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:38:33 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class  JComponent</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/JComponent.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../javax/swing/JComboBox.AccessibleJComboBox.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../javax/swing/JComponent.AccessibleJComponent.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="JComponent.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;<A HREF="#inner_class_summary">INNER</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.swing</FONT><BR>Class  JComponent</H2><PRE><A HREF="../../java/lang/Object.html">java.lang.Object</A>  |  +--<A HREF="../../java/awt/Component.html">java.awt.Component</A>        |        +--<A HREF="../../java/awt/Container.html">java.awt.Container</A>              |              +--<B>javax.swing.JComponent</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../java/awt/image/ImageObserver.html">ImageObserver</A>, <A HREF="../../java/awt/MenuContainer.html">MenuContainer</A>, <A HREF="../../java/io/Serializable.html">Serializable</A></DD></DL><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../javax/swing/AbstractButton.html">AbstractButton</A>, <A HREF="../../javax/swing/plaf/basic/BasicInternalFrameTitlePane.html">BasicInternalFrameTitlePane</A>, <A HREF="../../javax/swing/JColorChooser.html">JColorChooser</A>, <A HREF="../../javax/swing/JComboBox.html">JComboBox</A>, <A HREF="../../javax/swing/JFileChooser.html">JFileChooser</A>, <A HREF="../../javax/swing/JInternalFrame.html">JInternalFrame</A>, <A HREF="../../javax/swing/JInternalFrame.JDesktopIcon.html">JInternalFrame.JDesktopIcon</A>, <A HREF="../../javax/swing/JLabel.html">JLabel</A>, <A HREF="../../javax/swing/JLayeredPane.html">JLayeredPane</A>, <A HREF="../../javax/swing/JList.html">JList</A>, <A HREF="../../javax/swing/JMenuBar.html">JMenuBar</A>, <A HREF="../../javax/swing/JOptionPane.html">JOptionPane</A>, <A HREF="../../javax/swing/JPanel.html">JPanel</A>, <A HREF="../../javax/swing/JPopupMenu.html">JPopupMenu</A>, <A HREF="../../javax/swing/JProgressBar.html">JProgressBar</A>, <A HREF="../../javax/swing/JRootPane.html">JRootPane</A>, <A HREF="../../javax/swing/JScrollBar.html">JScrollBar</A>, <A HREF="../../javax/swing/JScrollPane.html">JScrollPane</A>, <A HREF="../../javax/swing/JSeparator.html">JSeparator</A>, <A HREF="../../javax/swing/JSlider.html">JSlider</A>, <A HREF="../../javax/swing/JSplitPane.html">JSplitPane</A>, <A HREF="../../javax/swing/JTabbedPane.html">JTabbedPane</A>, <A HREF="../../javax/swing/JTable.html">JTable</A>, <A HREF="../../javax/swing/table/JTableHeader.html">JTableHeader</A>, <A HREF="../../javax/swing/text/JTextComponent.html">JTextComponent</A>, <A HREF="../../javax/swing/JToolBar.html">JToolBar</A>, <A HREF="../../javax/swing/JToolTip.html">JToolTip</A>, <A HREF="../../javax/swing/JTree.html">JTree</A>, <A HREF="../../javax/swing/JViewport.html">JViewport</A></DD></DL><HR><DL><DT>public abstract class <B>JComponent</B><DT>extends <A HREF="../../java/awt/Container.html">Container</A><DT>implements <A HREF="../../java/io/Serializable.html">Serializable</A></DL><P>The base class for all Swing components except top-level containers. To use a component that inherits from <code>JComponent</code>, you must place the component in a containment hierarchy whose root is a top-level Swing container. Top-level Swing containers -- such as <code>JFrame</code>, <code>JDialog</code>,  and <code>JApplet</code> -- are specialized components that provide a place for other Swing components to paint themselves. For an explanation of containment hierarchies, see <ahref="http://java.sun.com/docs/books/tutorial/uiswing/overview/hierarchy.html">Swing Components and the Containment Hierarchy</a>, a section in <em>The Java Tutorial</em>. <p> The <code>JComponent</code> class provides: <ul> <li>The base class for both standard and custom components     that use the Swing architecture. <li>A "pluggable look and feel" (L&F) that can be specified by the     programmer or (optionally) selected by the user at runtime.     See <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/plaf.html">How     to Set the Look and Feel</a>     in <em>The Java Tutorial</em>     for more information. <li>Comprehensive keystroke handling.     See the document <a href="http://java.sun.com/products/jfc/tsc/special_report/kestrel/keybindings.html">Keyboard     Bindings in Swing</a>,     an article in <em>The Swing Connection</em>,     for more information. <li>Support for tool tips --     short descriptions that pop up when the cursor lingers     over a component.     See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/tooltip.html">How     to Use Tool Tips</a>     in <em>The Java Tutorial</em>     for more information. <li>Support for accessibility.     <code>JComponent</code> contains all of the methods in the     <code>Accessible</code> interface,     but it doesn't actually implement the interface.  That is the     responsibility of the individual classes     that extend <code>JComponent</code>. <li>Support for component-specific properties.     With the <A HREF="../../javax/swing/JComponent.html#putClientProperty(java.lang.Object, java.lang.Object)"><CODE>putClientProperty(java.lang.Object, java.lang.Object)</CODE></A>     and <A HREF="../../javax/swing/JComponent.html#getClientProperty(java.lang.Object)"><CODE>getClientProperty(java.lang.Object)</CODE></A> methods,     you can associate name-object pairs     with any object that descends from <code>JComponent</code>. <li>An infrastructure for painting     that includes double buffering and support for borders.     For more information see <a href="http://java.sun.com/docs/books/tutorial/uiswing/overview/draw.html">Painting</a> and <a href="http://java.sun.com/docs/books/tutorial/uiswing/misc/border.html">How     to Use Borders</a>,     both of which are sections in <em>The Java Tutorial</em>. </ul> For more information on these subjects, see the <a href="package-summary.html#package_description">Swing package description</a>  and <em>The Java Tutorial</em> section <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/jcomponent.html">The JComponent Class</a>. <p> <strong>Warning:</strong> Serialized objects of this class will not be compatible with future Swing releases.  The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing.  A future release of Swing will provide support for long term persistence.<P><DL><DT><B>See Also: </B><DD><A HREF="../../javax/swing/KeyStroke.html"><CODE>KeyStroke</CODE></A>, <A HREF="../../javax/swing/Action.html"><CODE>Action</CODE></A>, <A HREF="../../javax/swing/JComponent.html#setBorder(javax.swing.border.Border)"><CODE>setBorder(javax.swing.border.Border)</CODE></A>, <A HREF="../../javax/swing/JComponent.html#registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)"><CODE>registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)</CODE></A>, <A HREF="../../javax/swing/JOptionPane.html"><CODE>JOptionPane</CODE></A>, <A HREF="../../javax/swing/JComponent.html#setDebugGraphicsOptions(int)"><CODE>setDebugGraphicsOptions(int)</CODE></A>, <A HREF="../../javax/swing/JComponent.html#setToolTipText(java.lang.String)"><CODE>setToolTipText(java.lang.String)</CODE></A>, <A HREF="../../javax/swing/JComponent.html#setAutoscrolls(boolean)"><CODE>setAutoscrolls(boolean)</CODE></A>, <A HREF="../../serialized-form.html#javax.swing.JComponent">Serialized Form</A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><A NAME="inner_class_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Inner Class Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.AccessibleJComponent.html">JComponent.AccessibleJComponent</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Inner class of JComponent used to provide default support for accessibility.</TD></TR></TABLE>&nbsp;<A NAME="inner_classes_inherited_from_class_java.awt.Container"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Inner classes inherited from class java.awt.<A HREF="../../java/awt/Container.html">Container</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/awt/Container.AccessibleAWTContainer.html">Container.AccessibleAWTContainer</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="inner_classes_inherited_from_class_java.awt.Component"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Inner classes inherited from class java.awt.<A HREF="../../java/awt/Component.html">Component</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/awt/Component.AccessibleAWTComponent.html">Component.AccessibleAWTComponent</A></CODE></TD></TR></TABLE>&nbsp;<!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../javax/accessibility/AccessibleContext.html">AccessibleContext</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#accessibleContext">accessibleContext</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The AccessibleContext associated with this JComponent.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../javax/swing/event/EventListenerList.html">EventListenerList</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#listenerList">listenerList</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#TOOL_TIP_TEXT_KEY">TOOL_TIP_TEXT_KEY</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The comment to display when the cursor is over the component, also known as a "value tip", "flyover help", or "flyover label".</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../javax/swing/plaf/ComponentUI.html">ComponentUI</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#ui">ui</A></B></CODE><BR>

⌨️ 快捷键说明

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