📄 box.html
字号:
</TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="accessibleContext"><!-- --></A><H3>accessibleContext</H3><PRE>protected <A HREF="../../javax/accessibility/AccessibleContext.html">AccessibleContext</A> <B>accessibleContext</B></PRE><DL><DD>The currently set AccessibleContext object.</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Box(int)"><!-- --></A><H3>Box</H3><PRE>public <B>Box</B>(int axis)</PRE><DL><DD>Creates a <code>Box</code> that displays its components along the the specified axis.<DD><DL><DT><B>Parameters:</B><DD><CODE>axis</CODE> - can be either <code>BoxLayout.X_AXIS</code> (to display components from left to right) or <code>BoxLayout.Y_AXIS</code> (to display them from top to bottom)<DT><B>See Also: </B><DD><A HREF="../../javax/swing/Box.html#createHorizontalBox()"><CODE>createHorizontalBox()</CODE></A>, <A HREF="../../javax/swing/Box.html#createVerticalBox()"><CODE>createVerticalBox()</CODE></A></DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="createHorizontalBox()"><!-- --></A><H3>createHorizontalBox</H3><PRE>public static <A HREF="../../javax/swing/Box.html">Box</A> <B>createHorizontalBox</B>()</PRE><DL><DD>Creates a <code>Box</code> that displays its components from left to right.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the box</DL></DD></DL><HR><A NAME="createVerticalBox()"><!-- --></A><H3>createVerticalBox</H3><PRE>public static <A HREF="../../javax/swing/Box.html">Box</A> <B>createVerticalBox</B>()</PRE><DL><DD>Creates a <code>Box</code> that displays its components from top to bottom.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the box</DL></DD></DL><HR><A NAME="createRigidArea(java.awt.Dimension)"><!-- --></A><H3>createRigidArea</H3><PRE>public static <A HREF="../../java/awt/Component.html">Component</A> <B>createRigidArea</B>(<A HREF="../../java/awt/Dimension.html">Dimension</A> d)</PRE><DL><DD>Creates an invisible component that's always the specified size. <!-- WHEN WOULD YOU USE THIS AS OPPOSED TO A STRUT? --><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>d</CODE> - the dimensions of the invisible component<DT><B>Returns:</B><DD>the component<DT><B>See Also: </B><DD><A HREF="../../javax/swing/Box.html#createGlue()"><CODE>createGlue()</CODE></A>, <A HREF="../../javax/swing/Box.html#createHorizontalStrut(int)"><CODE>createHorizontalStrut(int)</CODE></A>, <A HREF="../../javax/swing/Box.html#createVerticalStrut(int)"><CODE>createVerticalStrut(int)</CODE></A></DL></DD></DL><HR><A NAME="createHorizontalStrut(int)"><!-- --></A><H3>createHorizontalStrut</H3><PRE>public static <A HREF="../../java/awt/Component.html">Component</A> <B>createHorizontalStrut</B>(int width)</PRE><DL><DD>Creates an invisible, fixed-width component. In a horizontal box, you typically use this method to force a certain amount of space between two components. In a vertical box, you might use this method to force the box to be at least the specified width. The invisible component has no height unless excess space is available, in which case it takes its share of available space, just like any other component that has no maximum height.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>width</CODE> - the width of the invisible component, in pixels >= 0<DT><B>Returns:</B><DD>the component<DT><B>See Also: </B><DD><A HREF="../../javax/swing/Box.html#createVerticalStrut(int)"><CODE>createVerticalStrut(int)</CODE></A>, <A HREF="../../javax/swing/Box.html#createGlue()"><CODE>createGlue()</CODE></A>, <A HREF="../../javax/swing/Box.html#createRigidArea(java.awt.Dimension)"><CODE>createRigidArea(java.awt.Dimension)</CODE></A></DL></DD></DL><HR><A NAME="createVerticalStrut(int)"><!-- --></A><H3>createVerticalStrut</H3><PRE>public static <A HREF="../../java/awt/Component.html">Component</A> <B>createVerticalStrut</B>(int height)</PRE><DL><DD>Creates an invisible, fixed-height component. In a vertical box, you typically use this method to force a certain amount of space between two components. In a horizontal box, you might use this method to force the box to be at least the specified height. The invisible component has no width unless excess space is available, in which case it takes its share of available space, just like any other component that has no maximum width.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>height</CODE> - the height of the invisible component, in pixels >= 0<DT><B>Returns:</B><DD>the component<DT><B>See Also: </B><DD><A HREF="../../javax/swing/Box.html#createHorizontalStrut(int)"><CODE>createHorizontalStrut(int)</CODE></A>, <A HREF="../../javax/swing/Box.html#createGlue()"><CODE>createGlue()</CODE></A>, <A HREF="../../javax/swing/Box.html#createRigidArea(java.awt.Dimension)"><CODE>createRigidArea(java.awt.Dimension)</CODE></A></DL></DD></DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -