mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-07 22:40:53 +03:00
Demo: fixed placement of dialogs (centered in frame)
This commit is contained in:
@@ -307,9 +307,11 @@ class OptionPanePanel
|
||||
}
|
||||
|
||||
private void showDialog() {
|
||||
Window window = SwingUtilities.windowForComponent( this );
|
||||
|
||||
if( optionPane.getWantsInput() ) {
|
||||
JOptionPane.showInputDialog(
|
||||
getParent(),
|
||||
window,
|
||||
optionPane.getMessage(),
|
||||
titleLabel.getText() + " Title",
|
||||
optionPane.getMessageType(),
|
||||
@@ -318,7 +320,7 @@ class OptionPanePanel
|
||||
null );
|
||||
} else {
|
||||
JOptionPane.showOptionDialog(
|
||||
getParent(),
|
||||
window,
|
||||
optionPane.getMessage(),
|
||||
titleLabel.getText() + " Title",
|
||||
optionPane.getOptionType(),
|
||||
|
||||
Reference in New Issue
Block a user