List of usage examples for javax.swing JOptionPane INFORMATION_MESSAGE
int INFORMATION_MESSAGE
To view the source code for javax.swing JOptionPane INFORMATION_MESSAGE.
Click Source Link
From source file:com.willwinder.universalgcodesender.ExperimentalWindow.java
/** * SerialCommunicatorListener implementation. *///from www .j av a 2 s. c om @Override public void fileStreamComplete(String filename, boolean success) { final String durationLabelCopy = connectionPanel.getDuration(); if (success) { java.awt.EventQueue.invokeLater(() -> { JOptionPane.showMessageDialog(new JFrame(), Localization.getString("mainWindow.ui.jobComplete") + " " + durationLabelCopy, Localization.getString("success"), JOptionPane.INFORMATION_MESSAGE); try { Thread.sleep(1000); } catch (InterruptedException ex) { } }); } else { displayErrorDialog(Localization.getString("mainWindow.error.jobComplete")); } }
From source file:ca.sqlpower.architect.swingui.enterprise.SecurityPanel.java
private boolean promptForDelete(SPObject obj) { String typeString = ""; if (obj instanceof User) { typeString = "User"; }/*w ww . j a v a2 s . c o m*/ if (obj instanceof Group) { typeString = "Group"; } Object[] options = { "Yes", "No" }; int option = JOptionPane.showOptionDialog(null, new Object[] { "Are you sure you want to delete the " + typeString + " \"" + obj.getName() + "\"?" }, "", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, options[0]); if (option == 0) { return true; } return false; }
From source file:colectordedatos.iniciocolector.java
private void RegistrodeerroresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RegistrodeerroresActionPerformed //captura de datos de la opcion a ver los errores idname opcion = (idname) opciones.getSelectedItem(); String id = opcion.getId();/*from ww w . jav a 2s. c o m*/ String name = opcion.getName(); //if para obligar al usuario a que complete todos lo campos pedidos en los Jconbobox if ((Diasinicio.getSelectedItem().equals("Dias")) || (Mesinicio.getSelectedItem().equals("Mes")) || (Anoinicio.getSelectedItem().equals("Ao")) || (horainicio.getSelectedItem().equals("Hora"))) { JOptionPane.showMessageDialog(null, "Ingrese todos lo parametros solicitados", "", JOptionPane.INFORMATION_MESSAGE); } else { //start_time con parse int enterodiaini = Integer.parseInt((String) Diasinicio.getSelectedItem()); int enteromesini = Integer.parseInt((String) Mesinicio.getSelectedItem()); int enteroanoini = Integer.parseInt((String) Anoinicio.getSelectedItem()); int enterohoraini = Integer.parseInt((String) horainicio.getSelectedItem()); //end_time con parse int enterodiater = Integer.parseInt((String) Diastermino.getSelectedItem()); int enteromester = Integer.parseInt((String) Mestermino.getSelectedItem()); int enteroanoter = Integer.parseInt((String) Anotermino.getSelectedItem()); int enterohorater = Integer.parseInt((String) horatermino.getSelectedItem()); //funcion para generar el calendario y psarlo como long a la url Calendar fechainicio = Calendar.getInstance(); fechainicio.set(enteroanoini, enteromesini - 1, enterodiaini, enterohoraini, 0); Calendar fechatermino = Calendar.getInstance(); fechatermino.set(enteroanoter, enteromester - 1, enterodiater, enterohorater, 0); //long que marcan el iniciocolector y fin a analizar los errores long start_time = fechainicio.getTimeInMillis(); long end_time = fechatermino.getTimeInMillis(); //if para definir que ventana abrir y generar el reporte resultados resul = new resultados(name, start_time, end_time, id); resul.setVisible(true); this.setVisible(false); } }
From source file:cgpanalyser.gui.MainWindow.java
private void menuAboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuAboutActionPerformed JOptionPane.showMessageDialog(null, "A Tool for Analysis of Digital Circuit Evolution Records\n" + "Master thesis 2014 \n" + "\n" + "Brno University of Technology\n" + "Faculty of Information Technology\n" + "\n" + "Author: Vlastimil Kapusta, xkapus02@stud.fit.vutbr.cz\n", "About", JOptionPane.INFORMATION_MESSAGE); }
From source file:com.quinsoft.zeidon.utils.JoeUtils.java
public static final void sysMessageBox(String msgTitle, String msgText) { //JOptionPane.showMessageDialog( null, msgText, msgTitle, JOptionPane.PLAIN_MESSAGE ); JOptionPane pane = new JOptionPane(msgText, JOptionPane.INFORMATION_MESSAGE); JDialog dialog = pane.createDialog(msgTitle); dialog.setModalityType(ModalityType.MODELESS); dialog.setAlwaysOnTop(true);/*from w w w.ja va 2s.c o m*/ dialog.setVisible(true); }
From source file:de.lazyzero.kkMulticopterFlashTool.KKMulticopterFlashTool.java
public void flashAVR() { boolean abort = check4USBlinker(); if (!abort) { new Thread() { public void run() { boolean notFailed = true; boolean isUSBtiny = programmer.getType().equals("usbtiny") ? true : false; firmwarePanel.setButtonsEnabled(false); updateButtons();// www . ja v a2 s . c o m try { control = new AvrdudeControl(KKMulticopterFlashTool.this, isUSBtiny); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); logger.log(Level.WARNING, e1.getMessage()); } if (isVerbose) { control.addAdditionalOption("-vvvvv "); } control.setPort(programmerPanel.getPort()); control.setProgrammer(programmer); if (programmerPanel.useBaudRate()) { control.addAdditionalOption("-b " + programmerPanel.getRate()); } logger.log(Level.INFO, programmer.getType()); // if (!programmer.getType().equals("stk500v2")){ // if (!programmer.getType().equals("usbtiny")){ // control.addAdditionalOption("-B 8"); // logger.log(Level.INFO, "set additional Option -B 8"); // } // } //if (controller.getCaption().equals("m48pa")||controller.getCaption().equals("m168p")||controller.getCaption().equals("m328p")){ control.addAdditionalOption("-e"); logger.log(Level.INFO, "set additional Option -e"); // } if (forceFlashing) { control.addAdditionalOption("-F"); } control.setDisableFuseCheck(false); //import additionalOptions from firmware control.addAndUpdateAdditionalOptions(firmware.getAdditionalOptions()); //for BL-ESC the fuses are null and the next step is skipped. if (controller.getLfuse() != null && controller.getHfuse() != null) { //write the fuses. try { logger.log(Level.INFO, "write fuses: "); control.writeFuses(controller); } catch (Exception e) { notFailed = false; e.printStackTrace(); logger.log(Level.WARNING, "error.writefuses"); err(_("error.writefuses")); } try { Thread.sleep(1500); } catch (InterruptedException e1) { // TODO Auto-generated catch block e1.printStackTrace(); logger.log(Level.WARNING, e1.toString()); } } //TODO add code to manipulate fuses //special code for enabling bootloader on simonk ESC if (controller.getCaption().equals(ESCBOOTLOADER) && notFailed) { logger.log(Level.INFO, "enable bootloader on simonk ESC: " + controller.getBootloaderAddress()); try { control.readFuses(controller, getTempFolder()); logger.log(Level.INFO, "hfuse: " + Integer.toHexString(Integer.parseInt(controller.getHfuse())) + " lfuse: " + Integer.toHexString(Integer.parseInt(controller.getLfuse()))); if (controller.getBootloaderAddress() == 512) { controller.changeFuseNibble(AVR.HFUSE, AVR.LOWER_NIBBLE, "a"); logger.log(Level.INFO, "fuses changed to: hfuse: " + Integer.toHexString(Integer.parseInt(controller.getHfuse())) + " lfuse: " + Integer.toHexString(Integer.parseInt(controller.getLfuse()))); } //added a delay to test if avrispmkii will then work try { Thread.sleep(1500); } catch (InterruptedException e1) { // TODO Auto-generated catch block e1.printStackTrace(); logger.log(Level.WARNING, e1.toString()); } logger.log(Level.INFO, "write new fuses: "); control.writeFuses(controller); } catch (Exception e) { notFailed = false; err(_("error.readhfuse")); logger.log(Level.WARNING, "error.replacefuse"); e.printStackTrace(); } //clean up controller.setHfuse(null); controller.setLfuse(null); File fuseFile = new File(getTempFolder() + "/hfuse.hex"); boolean isDeleted = false; if (fuseFile.exists() && fuseFile.isFile()) { isDeleted = fuseFile.delete(); logger.log(Level.INFO, "hfuse.hex deleted: " + isDeleted); } fuseFile = new File(getTempFolder() + "/lfuse.hex"); if (fuseFile.exists() && fuseFile.isFile()) { isDeleted = fuseFile.delete(); logger.log(Level.INFO, "lfuse.hex deleted: " + isDeleted); } try { Thread.sleep(1500); } catch (InterruptedException e1) { // TODO Auto-generated catch block e1.printStackTrace(); logger.log(Level.WARNING, e1.toString()); } } try { if (notFailed) { logger.log(Level.INFO, "flash firmware"); //TODO add flashing of eeprom here. try { File file = firmware.getFile(); println(_("flash.file") + ": " + file.getAbsolutePath()); control.writeFlash(controller, file.getAbsolutePath(), FileFormat.INTEL_HEX); if (isPopupsEnabled) { JOptionPane.showMessageDialog(kk, _("flash.successfull"), _("info"), JOptionPane.INFORMATION_MESSAGE); } println(_("flash.successfull")); } catch (FileCorruptException e) { err(_("flash.abort") + " " + _("flash.filecorrupt")); } } else { err(_("flash.abort")); logger.log(Level.WARNING, "flash.abort"); } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); err(_("error.writeflash")); logger.log(Level.WARNING, "error.writeflash"); } firmwarePanel.setButtonsEnabled(true); updateButtons(); } }.start(); } else { err(_("flash.abort")); } }
From source file:com.intuit.tank.tools.script.ScriptFilterRunner.java
private void runScript() { String text = scriptEditorTA.getText(); if (tankScript == null) { JOptionPane.showMessageDialog(this, "You must select a Tank XML file.", "Data Needed", JOptionPane.INFORMATION_MESSAGE); } else if (StringUtils.isEmpty(text)) { JOptionPane.showMessageDialog(this, "You need to enter your script.", "Data Needed", JOptionPane.INFORMATION_MESSAGE); } else {//from w w w . java 2s . c o m try { Map<String, Object> inputs = new HashMap<String, Object>(); inputs.put("script", tankScript); runner.runScript(text, ((ConfiguredLanguage) languageSelector.getSelectedItem()).getEngine(), inputs, output); } catch (ScriptException e) { output.append("Error executing script:\n"); output.append(e.getMessage() + "\n"); JOptionPane.showMessageDialog(this, e.getMessage(), "Error executing Script", JOptionPane.ERROR_MESSAGE); } } }
From source file:UserInterface.ViewPersonDetails.java
private void btncreatePatientActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btncreatePatientActionPerformed // TODO add your handling code here: p = (Person) cmbPerson.getSelectedItem(); if (p.getPatient().getName() != null) { JOptionPane.showMessageDialog(null, "Patient is already created", "Information", JOptionPane.INFORMATION_MESSAGE); btncreatePatient.setEnabled(false); } else {// w w w .jav a 2 s.c o m CreatePatientJPanel panel = new CreatePatientJPanel(p, userProcessContainer); userProcessContainer.add("CreatePatientJPanel", panel); CardLayout layout = (CardLayout) userProcessContainer.getLayout(); layout.next(userProcessContainer); } }
From source file:com.firmansyah.imam.sewa.kendaraan.FormUser.java
private void btnHapusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnHapusActionPerformed String id = inputIdUser.getText(); System.out.println("Memilih ID : " + id); int dialogButton = JOptionPane.YES_NO_OPTION; int dialogResult; dialogResult = JOptionPane.showConfirmDialog(this, "Anda yakin Menghapus Data ini? ", "Konfirmasi", dialogButton);//from ww w.j a va 2 s . c om if (dialogResult == 0) { String url = Path.serverURL + "/user/delete/" + id; getDataURL dataurl = new getDataURL(); try { String data = dataurl.getData(url); System.out.println(data); if (data.equals("1")) { JOptionPane.showMessageDialog(this, "Data Berhasil dihapus", "Informasi", JOptionPane.INFORMATION_MESSAGE); System.out.println("Menghapus Data ID : " + id); } else { JOptionPane.showMessageDialog(this, "Data Tidak Berhasil dihapus", "Informasi", JOptionPane.ERROR_MESSAGE); } } catch (IOException ex) { Logger.getLogger(FormUser.class.getName()).log(Level.SEVERE, null, ex); JOptionPane.showMessageDialog(this, "Data Tidak Bisa dihapus\nKarena Memiliki Relasi dengan Data Lainnya", "Informasi", JOptionPane.ERROR_MESSAGE); } } else { System.out.println("Tidak Menghapus : " + id); } // refresh form refreshForm(); }
From source file:be.agiv.security.demo.Main.java
private void showAbout() { this.statusBar.setStatus("Written by Frank Cornelis"); Provider jaxWsProvider = Provider.provider(); JOptionPane.showMessageDialog(this, "AGIV Java Security Demo " + getVersion() + "\n" + "Copyright (C) 2011-2013 AGIV.\n" + "Licensed under GNU LGPL 3.0.\n\n" + "Java version: " + System.getProperty("java.version") + "\n" + "System: " + System.getProperty("os.name") + " " + System.getProperty("os.version") + " " + System.getProperty("os.arch") + "\n\n" + "JAX-WS provider: " + jaxWsProvider.getClass().getName(), "About", JOptionPane.INFORMATION_MESSAGE); }