📄 jcomponent.html
字号:
<BR> Returns true if the preferred size has been set to a non-null value otherwise returns false.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#isRequestFocusEnabled()">isRequestFocusEnabled</A></B>()</CODE><BR> Returns whether the receiving component can obtain the focus by calling requestFocus.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#isValidateRoot()">isValidateRoot</A></B>()</CODE><BR> If this method returns true, revalidate() calls by descendants of this component will cause the entire tree beginning with this root to be validated.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#paint(java.awt.Graphics)">paint</A></B>(<A HREF="../../java/awt/Graphics.html">Graphics</A> g)</CODE><BR> This method is invoked by Swing to draw components.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#paintBorder(java.awt.Graphics)">paintBorder</A></B>(<A HREF="../../java/awt/Graphics.html">Graphics</A> g)</CODE><BR> Paints the component's border.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#paintChildren(java.awt.Graphics)">paintChildren</A></B>(<A HREF="../../java/awt/Graphics.html">Graphics</A> g)</CODE><BR> Paints this component's children.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#paintComponent(java.awt.Graphics)">paintComponent</A></B>(<A HREF="../../java/awt/Graphics.html">Graphics</A> g)</CODE><BR> If the UI delegate is non-null, calls its paint method.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#paintImmediately(int, int, int, int)">paintImmediately</A></B>(int x, int y, int w, int h)</CODE><BR> Paints the specified region in this component and all of its descendants that overlap the region, immediately.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#paintImmediately(java.awt.Rectangle)">paintImmediately</A></B>(<A HREF="../../java/awt/Rectangle.html">Rectangle</A> r)</CODE><BR> Paints the specified region now.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#paramString()">paramString</A></B>()</CODE><BR> Returns a string representation of this JComponent.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#print(java.awt.Graphics)">print</A></B>(<A HREF="../../java/awt/Graphics.html">Graphics</A> g)</CODE><BR> Invoke this method to print the receiver.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#printAll(java.awt.Graphics)">printAll</A></B>(<A HREF="../../java/awt/Graphics.html">Graphics</A> g)</CODE><BR> Invoke this method to print the receiver.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#printBorder(java.awt.Graphics)">printBorder</A></B>(<A HREF="../../java/awt/Graphics.html">Graphics</A> g)</CODE><BR> Prints the component's border.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#printChildren(java.awt.Graphics)">printChildren</A></B>(<A HREF="../../java/awt/Graphics.html">Graphics</A> g)</CODE><BR> Prints this component's children.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#printComponent(java.awt.Graphics)">printComponent</A></B>(<A HREF="../../java/awt/Graphics.html">Graphics</A> g)</CODE><BR> This is invoked during a printing operation.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#processComponentKeyEvent(java.awt.event.KeyEvent)">processComponentKeyEvent</A></B>(<A HREF="../../java/awt/event/KeyEvent.html">KeyEvent</A> e)</CODE><BR> Processes any key events that the component itself recognizes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#processFocusEvent(java.awt.event.FocusEvent)">processFocusEvent</A></B>(<A HREF="../../java/awt/event/FocusEvent.html">FocusEvent</A> e)</CODE><BR> Processes focus events occurring on this component by dispatching them to any registered <code>FocusListener</code> objects.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#processKeyBinding(javax.swing.KeyStroke, java.awt.event.KeyEvent, int, boolean)">processKeyBinding</A></B>(<A HREF="../../javax/swing/KeyStroke.html">KeyStroke</A> ks, <A HREF="../../java/awt/event/KeyEvent.html">KeyEvent</A> e, int condition, boolean pressed)</CODE><BR> Invoked to process the key bindings for <code>ks</code> as the result of the KeyEvent <code>e</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#processKeyEvent(java.awt.event.KeyEvent)">processKeyEvent</A></B>(<A HREF="../../java/awt/event/KeyEvent.html">KeyEvent</A> e)</CODE><BR> Overrides processKeyEvent to process events.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#processMouseMotionEvent(java.awt.event.MouseEvent)">processMouseMotionEvent</A></B>(<A HREF="../../java/awt/event/MouseEvent.html">MouseEvent</A> e)</CODE><BR> Processes mouse motion events occurring on this component by dispatching them to any registered <code>MouseMotionListener</code> objects.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#putClientProperty(java.lang.Object, java.lang.Object)">putClientProperty</A></B>(<A HREF="../../java/lang/Object.html">Object</A> key, <A HREF="../../java/lang/Object.html">Object</A> value)</CODE><BR> Adds an arbitrary key/value "client property" to this component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#registerKeyboardAction(java.awt.event.ActionListener, javax.swing.KeyStroke, int)">registerKeyboardAction</A></B>(<A HREF="../../java/awt/event/ActionListener.html">ActionListener</A> anAction, <A HREF="../../javax/swing/KeyStroke.html">KeyStroke</A> aKeyStroke, int aCondition)</CODE><BR> This method is now obsolete, please use a combination of <code>getActionMap()</code> and <code>getInputMap()</code> for similiar behavior.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int)">registerKeyboardAction</A></B>(<A HREF="../../java/awt/event/ActionListener.html">ActionListener</A> anAction, <A HREF="../../java/lang/String.html">String</A> aCommand, <A HREF="../../javax/swing/KeyStroke.html">KeyStroke</A> aKeyStroke, int aCondition)</CODE><BR> This method is now obsolete, please use a combination of <code>getActionMap()</code> and <code>getInputMap()</code> for similiar behavior.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#removeAncestorListener(javax.swing.event.AncestorListener)">removeAncestorListener</A></B>(<A HREF="../../javax/swing/event/AncestorListener.html">AncestorListener</A> listener)</CODE><BR> Unregisters <i>listener</i> so that it will no longer receive AncestorEvents</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#removeNotify()">removeNotify</A></B>()</CODE><BR> Notifies this component that it no longer has a parent component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#removePropertyChangeListener(java.beans.PropertyChangeListener)">removePropertyChangeListener</A></B>(<A HREF="../../java/beans/PropertyChangeListener.html">PropertyChangeListener</A> listener)</CODE><BR> Removes a PropertyChangeListener from the listener list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JComponent.html#removePr
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -