feat: set modal results dialog in gui

This commit is contained in:
Georgy Litvinov 2021-10-18 15:14:14 +02:00
parent c44b41ad8a
commit 9a4f2eda97

View file

@ -2,12 +2,10 @@ package pro.litvinovg.w2phtml.gui;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.FlowLayout; import java.awt.FlowLayout;
import java.util.Iterator;
import java.util.Map;
import javax.swing.JButton; import javax.swing.JButton;
import javax.swing.JDialog; import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.border.EmptyBorder; import javax.swing.border.EmptyBorder;
@ -16,7 +14,6 @@ import pro.litvinovg.w2phtml.SingleLogArray;
import javax.swing.GroupLayout; import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment; import javax.swing.GroupLayout.Alignment;
import javax.swing.JTextArea; import javax.swing.JTextArea;
import javax.swing.JLabel;
import javax.swing.JScrollPane; import javax.swing.JScrollPane;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -27,6 +24,10 @@ import javax.swing.ScrollPaneConstants;
public class ResultsDialog extends JDialog { public class ResultsDialog extends JDialog {
/**
*
*/
private static final long serialVersionUID = 1L;
private final JPanel contentPanel = new JPanel(); private final JPanel contentPanel = new JPanel();
private JTextArea txt_conversionLogs; private JTextArea txt_conversionLogs;
private static ResultsDialog dialog = null; private static ResultsDialog dialog = null;
@ -39,6 +40,8 @@ public class ResultsDialog extends JDialog {
dialog = new ResultsDialog(); dialog = new ResultsDialog();
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setVisible(true); dialog.setVisible(true);
dialog.setModal(true);
dialog.setModalityType (ModalityType.APPLICATION_MODAL);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }