📄 joptionpane.html
字号:
<BR> Sets the option pane's message-object.</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/JOptionPane.html#setMessageType(int)">setMessageType</A></B>(int newType)</CODE><BR> Sets the option pane's message type.</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/JOptionPane.html#setOptions(java.lang.Object[])">setOptions</A></B>(<A HREF="../../java/lang/Object.html">Object</A>[] newOptions)</CODE><BR> Sets the options this pane displays.</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/JOptionPane.html#setOptionType(int)">setOptionType</A></B>(int newType)</CODE><BR> Sets the options to display.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#setRootFrame(java.awt.Frame)">setRootFrame</A></B>(<A HREF="../../java/awt/Frame.html">Frame</A> newRootFrame)</CODE><BR> Sets the frame to use for class methods in which a frame is not provided.</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/JOptionPane.html#setSelectionValues(java.lang.Object[])">setSelectionValues</A></B>(<A HREF="../../java/lang/Object.html">Object</A>[] newValues)</CODE><BR> Sets the selection values for a pane that provides the user with a list of items to choose from.</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/JOptionPane.html#setUI(javax.swing.plaf.OptionPaneUI)">setUI</A></B>(<A HREF="../../javax/swing/plaf/OptionPaneUI.html">OptionPaneUI</A> ui)</CODE><BR> Sets the UI object which implements the L&F for 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/JOptionPane.html#setValue(java.lang.Object)">setValue</A></B>(<A HREF="../../java/lang/Object.html">Object</A> newValue)</CODE><BR> Sets the value the user has chosen.</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/JOptionPane.html#setWantsInput(boolean)">setWantsInput</A></B>(boolean newValue)</CODE><BR> If <code>newValue</code> is true, a <code>parentComponent</code> is provided to allow the user to input a value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#showConfirmDialog(java.awt.Component, java.lang.Object)">showConfirmDialog</A></B>(<A HREF="../../java/awt/Component.html">Component</A> parentComponent, <A HREF="../../java/lang/Object.html">Object</A> message)</CODE><BR> Brings up a modal dialog with the options Yes, No and Cancel; with the title, "Select an Option".</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#showConfirmDialog(java.awt.Component, java.lang.Object, java.lang.String, int)">showConfirmDialog</A></B>(<A HREF="../../java/awt/Component.html">Component</A> parentComponent, <A HREF="../../java/lang/Object.html">Object</A> message, <A HREF="../../java/lang/String.html">String</A> title, int optionType)</CODE><BR> Brings up a modal dialog where the number of choices is determined by the <code>optionType</code> parameter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#showConfirmDialog(java.awt.Component, java.lang.Object, java.lang.String, int, int)">showConfirmDialog</A></B>(<A HREF="../../java/awt/Component.html">Component</A> parentComponent, <A HREF="../../java/lang/Object.html">Object</A> message, <A HREF="../../java/lang/String.html">String</A> title, int optionType, int messageType)</CODE><BR> Brings up a modal dialog where the number of choices is determined by the <code>optionType</code> parameter, where the <code>messageType</code> parameter determines the icon to display.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#showConfirmDialog(java.awt.Component, java.lang.Object, java.lang.String, int, int, javax.swing.Icon)">showConfirmDialog</A></B>(<A HREF="../../java/awt/Component.html">Component</A> parentComponent, <A HREF="../../java/lang/Object.html">Object</A> message, <A HREF="../../java/lang/String.html">String</A> title, int optionType, int messageType, <A HREF="../../javax/swing/Icon.html">Icon</A> icon)</CODE><BR> Brings up a modal dialog with a specified icon, where the number of choices is determined by the <code>optionType</code> parameter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#showInputDialog(java.awt.Component, java.lang.Object)">showInputDialog</A></B>(<A HREF="../../java/awt/Component.html">Component</A> parentComponent, <A HREF="../../java/lang/Object.html">Object</A> message)</CODE><BR> Shows a question-message dialog requesting input from the user parented to <code>parentComponent</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#showInputDialog(java.awt.Component, java.lang.Object, java.lang.String, int)">showInputDialog</A></B>(<A HREF="../../java/awt/Component.html">Component</A> parentComponent, <A HREF="../../java/lang/Object.html">Object</A> message, <A HREF="../../java/lang/String.html">String</A> title, int messageType)</CODE><BR> Shows a dialog requesting input from the user parented to <code>parentComponent</code> with the dialog having the title <code>title</code> and message type <code>messageType</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#showInputDialog(java.awt.Component, java.lang.Object, java.lang.String, int, javax.swing.Icon, java.lang.Object[], java.lang.Object)">showInputDialog</A></B>(<A HREF="../../java/awt/Component.html">Component</A> parentComponent, <A HREF="../../java/lang/Object.html">Object</A> message, <A HREF="../../java/lang/String.html">String</A> title, int messageType, <A HREF="../../javax/swing/Icon.html">Icon</A> icon, <A HREF="../../java/lang/Object.html">Object</A>[] selectionValues, <A HREF="../../java/lang/Object.html">Object</A> initialSelectionValue)</CODE><BR> Prompts the user for input in a blocking dialog where the initial selection, possible selections, and all other options can be specified.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#showInputDialog(java.lang.Object)">showInputDialog</A></B>(<A HREF="../../java/lang/Object.html">Object</A> message)</CODE><BR> Shows a question-message dialog requesting input from the user.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#showInternalConfirmDialog(java.awt.Component, java.lang.Object)">showInternalConfirmDialog</A></B>(<A HREF="../../java/awt/Component.html">Component</A> parentComponent, <A HREF="../../java/lang/Object.html">Object</A> message)</CODE><BR> Brings up an internal dialog panel with the options Yes, No and Cancel; with the title, "Select an Option".</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#showInternalConfirmDialog(java.awt.Component, java.lang.Object, java.lang.String, int)">showInternalConfirmDialog</A></B>(<A HREF="../../java/awt/Component.html">Component</A> parentComponent, <A HREF="../../java/lang/Object.html">Object</A> message, <A HREF="../../java/lang/String.html">String</A> title, int optionType)</CODE><BR> Brings up a internal dialog panel where the number of choices is determined by the <code>optionType</code> parameter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#showInternalConfirmDialog(java.awt.Component, java.lang.Object, java.lang.String, int, int)">showInternalConfirmDialog</A></B>(<A HREF="../../java/awt/Component.html">Component</A> parentComponent, <A HREF="../../java/lang/Object.html">Object</A> message, <A HREF="../../java/lang/String.html">String</A> title, int optionType, int messageType)</CODE><BR> Brings up an internal dialog panel where the number of choices is determined by the <code>optionType</code> parameter, where the <code>messageType</code> parameter determines the icon to display.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#showInternalConfirmDialog(java.awt.Component, java.lang.Object, java.lang.String, int, int, javax.swing.Icon)">showInternalConfirmDialog</A></B>(<A HREF="../../java/awt/Component.html">Component</A> parentComponent, <A HREF="../../java/lang/Object.html">Object</A> message, <A HREF="../../java/lang/String.html">String</A> title, int optionType, int messageType, <A HREF="../../javax/swing/Icon.html">Icon</A> icon)</CODE><BR> Brings up an internal dialog panel with a specified icon, where the number of choices is determined by the <code>optionType</code> parameter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#showInternalInputDialog(java.awt.Component, java.lang.Object)">showInternalInputDialog</A></B>(<A HREF="../../java/awt/Component.html">Component</A> parentComponent, <A HREF="../../java/lang/Object.html">Object</A> message)</CODE><BR> Shows an internal question-message dialog requesting input from the user parented to <code>parentComponent</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#showInternalInputDialog(java.awt.Component, java.lang.Object, java.lang.String, int)">showInternalInputDialog</A></B>(<A HREF="../../java/awt/Component.html">Component</A> parentComponent, <A HREF="../../java/lang/Object.html">Object</A> message, <A HREF="../../java/lang/String.html">String</A> title, int messageType)</CODE><BR> Shows an internal dialog requesting input from the user parented to <code>parentComponent</code> with the dialog having the title <code>title</code> and message type <code>messageType</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#showInternalInputDialog(java.awt.Component, java.lang.Object, java.lang.String, int, javax.swing.Icon, java.lang.Object[], java.lang.Object)">showInternalInputDialog</A></B>(<A HREF="../../java/awt/Component.html">Component</A> parentComponent, <A HREF="../../java/lang/Object.html
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -