📄 joptionpane.html
字号:
<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#NO_OPTION">NO_OPTION</A></B></CODE><BR> Return value from class method if NO is chosen.</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#OK_CANCEL_OPTION">OK_CANCEL_OPTION</A></B></CODE><BR> Type used for showConfirmDialog.</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#OK_OPTION">OK_OPTION</A></B></CODE><BR> Return value form class method if OK is chosen.</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#OPTION_TYPE_PROPERTY">OPTION_TYPE_PROPERTY</A></B></CODE><BR> Bound property name for optionType.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../java/lang/Object.html">Object</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#options">options</A></B></CODE><BR> Options to display to the user.</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#OPTIONS_PROPERTY">OPTIONS_PROPERTY</A></B></CODE><BR> Bounds property namer for option.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#optionType">optionType</A></B></CODE><BR> Option type, one of DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION or OK_CANCEL_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#PLAIN_MESSAGE">PLAIN_MESSAGE</A></B></CODE><BR> No icon is used.</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#QUESTION_MESSAGE">QUESTION_MESSAGE</A></B></CODE><BR> Used for questions.</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#SELECTION_VALUES_PROPERTY">SELECTION_VALUES_PROPERTY</A></B></CODE><BR> Bound property name for selectionValues.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../java/lang/Object.html">Object</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#selectionValues">selectionValues</A></B></CODE><BR> Array of values the user can choose from.</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#UNINITIALIZED_VALUE">UNINITIALIZED_VALUE</A></B></CODE><BR> Indicates that the user has not yet selected a value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#value">value</A></B></CODE><BR> Currently selected value, will be a valid option, or UNINITIALIZED_VALUE or <code>null</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#VALUE_PROPERTY">VALUE_PROPERTY</A></B></CODE><BR> Bounds property name for value.</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#WANTS_INPUT_PROPERTY">WANTS_INPUT_PROPERTY</A></B></CODE><BR> Bound property name for wantsInput.</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/JOptionPane.html#wantsInput">wantsInput</A></B></CODE><BR> If true, a UI widget will be provided to the user to get input.</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#WARNING_MESSAGE">WARNING_MESSAGE</A></B></CODE><BR> Used for warning messages.</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#YES_NO_CANCEL_OPTION">YES_NO_CANCEL_OPTION</A></B></CODE><BR> Type used for showConfirmDialog.</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#YES_NO_OPTION">YES_NO_OPTION</A></B></CODE><BR> Type used for showConfirmDialog.</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#YES_OPTION">YES_OPTION</A></B></CODE><BR> Return value from class method if YES is chosen.</TD></TR></TABLE> <A NAME="fields_inherited_from_class_javax.swing.JComponent"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class javax.swing.<A HREF="../../javax/swing/JComponent.html">JComponent</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../javax/swing/JComponent.html#accessibleContext">accessibleContext</A>, <A HREF="../../javax/swing/JComponent.html#listenerList">listenerList</A>, <A HREF="../../javax/swing/JComponent.html#TOOL_TIP_TEXT_KEY">TOOL_TIP_TEXT_KEY</A>, <A HREF="../../javax/swing/JComponent.html#ui">ui</A>, <A HREF="../../javax/swing/JComponent.html#UNDEFINED_CONDITION">UNDEFINED_CONDITION</A>, <A HREF="../../javax/swing/JComponent.html#WHEN_ANCESTOR_OF_FOCUSED_COMPONENT">WHEN_ANCESTOR_OF_FOCUSED_COMPONENT</A>, <A HREF="../../javax/swing/JComponent.html#WHEN_FOCUSED">WHEN_FOCUSED</A>, <A HREF="../../javax/swing/JComponent.html#WHEN_IN_FOCUSED_WINDOW">WHEN_IN_FOCUSED_WINDOW</A></CODE></TD></TR></TABLE> <A NAME="fields_inherited_from_class_java.awt.Component"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields 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.html#BOTTOM_ALIGNMENT">BOTTOM_ALIGNMENT</A>, <A HREF="../../java/awt/Component.html#CENTER_ALIGNMENT">CENTER_ALIGNMENT</A>, <A HREF="../../java/awt/Component.html#LEFT_ALIGNMENT">LEFT_ALIGNMENT</A>, <A HREF="../../java/awt/Component.html#RIGHT_ALIGNMENT">RIGHT_ALIGNMENT</A>, <A HREF="../../java/awt/Component.html#TOP_ALIGNMENT">TOP_ALIGNMENT</A></CODE></TD></TR></TABLE> <A NAME="fields_inherited_from_class_java.awt.image.ImageObserver"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface java.awt.image.<A HREF="../../java/awt/image/ImageObserver.html">ImageObserver</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/awt/image/ImageObserver.html#ABORT">ABORT</A>, <A HREF="../../java/awt/image/ImageObserver.html#ALLBITS">ALLBITS</A>, <A HREF="../../java/awt/image/ImageObserver.html#ERROR">ERROR</A>, <A HREF="../../java/awt/image/ImageObserver.html#FRAMEBITS">FRAMEBITS</A>, <A HREF="../../java/awt/image/ImageObserver.html#HEIGHT">HEIGHT</A>, <A HREF="../../java/awt/image/ImageObserver.html#PROPERTIES">PROPERTIES</A>, <A HREF="../../java/awt/image/ImageObserver.html#SOMEBITS">SOMEBITS</A>, <A HREF="../../java/awt/image/ImageObserver.html#WIDTH">WIDTH</A></CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#JOptionPane()">JOptionPane</A></B>()</CODE><BR> Creates a <code>JOptionPane</code> with a test message.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#JOptionPane(java.lang.Object)">JOptionPane</A></B>(<A HREF="../../java/lang/Object.html">Object</A> message)</CODE><BR> Creates a instance of <code>JOptionPane</code> to display a message using the plain-message message type and the default options delivered by the UI.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#JOptionPane(java.lang.Object, int)">JOptionPane</A></B>(<A HREF="../../java/lang/Object.html">Object</A> message, int messageType)</CODE><BR> Creates an instance of <code>JOptionPane</code> to display a message with the specified message type and the default options,</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#JOptionPane(java.lang.Object, int, int)">JOptionPane</A></B>(<A HREF="../../java/lang/Object.html">Object</A> message, int messageType, int optionType)</CODE><BR> Creates an instance of <code>JOptionPane</code> to display a message with the specified message type and options.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#JOptionPane(java.lang.Object, int, int, javax.swing.Icon)">JOptionPane</A></B>(<A HREF="../../java/lang/Object.html">Object</A> message, int messageType, int optionType, <A HREF="../../javax/swing/Icon.html">Icon</A> icon)</CODE><BR> Creates an instance of <code>JOptionPane</code> to display a message with the specified message type, options, and icon.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/swing/JOptionPane.html#JOptionPane(java.lang.Object, int, int, javax.swing.Icon, java.lang.Object[])">JOptionPane</A></B>(<A HREF="../../java/lang/Object.html">Object</A> message, int messageType, int optionType, <A HREF="../../javax/swing/Icon.html">Icon</A> icon, <A HREF="../../java/lang/Object.html">Object</A>[] options)</CODE><BR> Creates an instance of JOptionPane to display a message
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -