public class JOptionPanes extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
showValidatedTextInputDialog(Window parent,
String title,
JComponent mainComponent,
JTextComponent textComponent,
Predicate<String> validInputPredicate)
Create a new input dialog that performs validation.
|
public static int showValidatedTextInputDialog(Window parent, String title, JComponent mainComponent, JTextComponent textComponent, Predicate<String> validInputPredicate)
parent - The optional parenttitle - The titlemainComponent - The main component that is shown in the
dialog. This must be a component that contains the text component.textComponent - The text componentvalidInputPredicate - The predicate that says whether the
input is validJOptionPane.OK_OPTION if OK was pressed. Any
other value otherwise.Copyright © 2022. All rights reserved.