JOptionPane.showMessageDialog wait until OK is clicked?
问题 This might be a very simple thing that I'm overlooking, but I just can't seem to figure it out. I have the following method that updates a JTable: class TableModel extends AbstractTableModel { public void updateTable() { try { // update table here ... } catch (NullPointerException npe) { isOpenDialog = true; JOptionPane.showMessageDialog(null, "No active shares found on this IP!"); isOpenDialog = false; } } } However, I don't want isOpenDialog boolean to be set to false until the OK button on