def word_corrections(event): words_string = "" for word in self.word_classifier.words: words_string = words_string + word.upper() + "\n" text = "The words that can be corrected are:\n\n" + words_string dialog = JOptionPane(text, JOptionPane.INFORMATION_MESSAGE) dialog_wrapper = JDialog(self, "Available Words", False) dialog_wrapper.setContentPane(dialog) dialog_wrapper.pack() dialog_wrapper.setVisible(True)
def word_corrections(event): words_string = "" for word in self.word_classifier.words: words_string = words_string + word.upper() + "\n" text = "The words that can be corrected are:\n\n" +words_string dialog = JOptionPane(text, JOptionPane.INFORMATION_MESSAGE) dialog_wrapper = JDialog(self,"Available Words",False) dialog_wrapper.setContentPane(dialog) dialog_wrapper.pack() dialog_wrapper.setVisible(True)
def __showModal(params=None): from javax.swing import JDialog windowName = 'GWFileBrowser' if windowName in system.gui.getWindowNames(): window = system.nav.openWindowInstance(windowName, params) system.nav.centerWindow(window) rc = window.getRootContainer() #rc.load() cp = window.getContentPane() window.setVisible(False) dlg = JDialog(None, True) dlg.setContentPane(cp) dlg.setSize(window.getWidth(), window.getHeight()) dlg.setMinimumSize(window.getMinimumSize()) dlg.setMaximumSize(window.getMaximumSize()) dlg.setLocation(window.getX(), window.getY()) #dlg.setLocationRelativeTo(None) dlg.setTitle(window.getTitle()) dlg.setVisible(True) system.nav.closeWindow(window) return rc.Result return None