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.proyecto.vista.MantenimientoEmpleado.java
private void btnguardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnguardarActionPerformed // TODO add your handling code here: List<Integer> array = new ArrayList(); array.add(FormularioUtil.Validar(FormularioUtil.TipoValidacion.LETRA, this.telefonoField, "telefono")); array.add(FormularioUtil.Validar(FormularioUtil.TipoValidacion.NUMERO, this.apellidoMField, "apellido materno")); array.add(FormularioUtil.Validar(FormularioUtil.TipoValidacion.NUMERO, this.apellidoPField, "apellido paterno")); array.add(FormularioUtil.Validar(FormularioUtil.TipoValidacion.NUMERO, this.nombreField, "nombre")); array.add(FormularioUtil.Validar(FormularioUtil.TipoValidacion.LETRA, this.idField, "DNI")); FormularioUtil.validar2(array);//from w w w. ja v a 2s . c o m if (FormularioUtil.error) { JOptionPane.showMessageDialog(null, FormularioUtil.mensaje, "Mensaje del Sistema", JOptionPane.ERROR_MESSAGE); FormularioUtil.mensaje = ""; FormularioUtil.error = false; } else { String palabra = ""; String palabra2 = ""; if (accion == 1) { palabra = "registrar"; palabra2 = "registrado"; if (JOptionPane.showConfirmDialog(null, "Desea " + palabra + " el Empleado?", "Mensaje del Sistema", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { empleadoControlador.getSeleccionado().setDni(idField.getText().toUpperCase()); empleadoControlador.getSeleccionado().setNombres(nombreField.getText().toUpperCase()); empleadoControlador.getSeleccionado() .setApellidoPaterno(apellidoPField.getText().toUpperCase()); empleadoControlador.getSeleccionado() .setApellidoMaterno(apellidoMField.getText().toUpperCase()); empleadoControlador.getSeleccionado().setTelefono(telefonoField.getText().toUpperCase()); empleadoControlador.accion(accion); lista.add(empleadoControlador.getSeleccionado()); if (accion == 1) { JOptionPane.showMessageDialog(null, "Empleado " + palabra2 + " correctamente", "Mensaje del Sistema", JOptionPane.INFORMATION_MESSAGE); FormularioUtil.limpiarComponente(panelDatos); } else { JOptionPane.showMessageDialog(null, "Empleado no " + palabra2, "Mensaje del Sistema", JOptionPane.ERROR_MESSAGE); } } else { FormularioUtil.limpiarComponente(panelDatos); JOptionPane.showMessageDialog(null, "Empleado no " + palabra2, "Mensaje del Sistema", JOptionPane.ERROR_MESSAGE); } } else if (accion == 2) { palabra = "modificar"; palabra2 = "modificado"; if (JOptionPane.showConfirmDialog(null, "Desea " + palabra + " el Empleado?", "Mensaje del Sistema", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { if (accion == 2) { JOptionPane.showMessageDialog(null, "Empleado " + palabra2 + " correctamente", "Mensaje del Sistema", JOptionPane.INFORMATION_MESSAGE); lista.clear(); empleadoControlador.getSeleccionado().setDni(idField.getText().toUpperCase()); empleadoControlador.getSeleccionado().setNombres(nombreField.getText().toUpperCase()); empleadoControlador.getSeleccionado() .setApellidoPaterno(apellidoPField.getText().toUpperCase()); empleadoControlador.getSeleccionado() .setApellidoMaterno(apellidoMField.getText().toUpperCase()); empleadoControlador.getSeleccionado().setTelefono(telefonoField.getText().toUpperCase()); empleadoControlador.accion(accion); listar(); FormularioUtil.limpiarComponente(panelDatos); } else { JOptionPane.showMessageDialog(null, "Empleado no " + palabra2, "Mensaje del Sistema", JOptionPane.ERROR_MESSAGE); } } else { FormularioUtil.limpiarComponente(panelDatos); JOptionPane.showMessageDialog(null, "Empleado no " + palabra2, "Mensaje del Sistema", JOptionPane.ERROR_MESSAGE); } } FormularioUtil.limpiarComponente(panelDatos); FormularioUtil.activarComponente(panelOpciones, true); FormularioUtil.activarComponente(panelGuardar, false); FormularioUtil.activarComponente(panelDatos, false); } }
From source file:freemind.controller.Controller.java
public void informationMessage(Object message) { JOptionPane.showMessageDialog(getFrame().getContentPane(), message.toString(), "FreeMind", JOptionPane.INFORMATION_MESSAGE); }
From source file:Forms.frm_Penghuni.java
private void btnCariPenghuniActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCariPenghuniActionPerformed // TODO add your handling code here: if (cbCariPenghuni.getSelectedItem().equals("Berdasarkan")) {//jika pada combobox yang terseleksi masih"cari bardasarkan, maka jalankan perintah berikut JOptionPane.showMessageDialog(null, "Pilih Filter Pencarian", "Konfirmasi", JOptionPane.INFORMATION_MESSAGE); //sintak diatas untuk menampilkan pesan dialog beruppa kofirmasi } else {/*from w ww. ja v a 2 s. c om*/ InitTable(); if (tfCariPenghuni.getText().length() == 0) { TampilDataPenghuni(); } else { PencarianData(cbCariPenghuni.getSelectedItem().toString(), tfCariPenghuni.getText()); } } }
From source file:freemind.controller.Controller.java
public void informationMessage(Object message, JComponent component) { JOptionPane.showMessageDialog(component, message.toString(), "FreeMind", JOptionPane.INFORMATION_MESSAGE); }
From source file:probe.com.view.core.chart4j.VennDiagramPanel.java
/** * Handles mouse clicks in the chart panel. * * @param event the chart mouse event/*w w w . j av a 2 s. c o m*/ */ private void mouseClickedInChart(ChartMouseEvent event) { ArrayList<ChartEntity> entities = getEntitiesForPoint(event.getTrigger().getPoint().x, event.getTrigger().getPoint().y); if (entities.isEmpty()) { return; } boolean dataPointFound = false; String dataPointTooltip = ""; for (ChartEntity tempEntity : entities) { if (tempEntity instanceof XYAnnotationEntity) { if (((XYAnnotationEntity) tempEntity).getToolTipText() != null) { dataPointFound = true; dataPointTooltip = ((XYAnnotationEntity) tempEntity).getToolTipText(); } } } if (dataPointFound) { String dataset = tooltipToDatasetMap.get(dataPointTooltip); JOptionPane.showMessageDialog(this, dataPointTooltip + ":\n" + vennDiagramResults.get(dataset), "Selected Values", JOptionPane.INFORMATION_MESSAGE); } }
From source file:burlov.ultracipher.swing.SwingGuiApplication.java
public void showSystemInfo() { JOptionPane.showMessageDialog(getMainFrame(), createSystemInfo(), "System info", JOptionPane.INFORMATION_MESSAGE); }
From source file:de.juwimm.cms.content.panel.PanDocuments.java
/** * * @param files/*from w ww . ja v a2s . c o m*/ * @param unit * @param documentId */ public void uploadFiles(File[] files, Integer unit, Integer viewComponentId, Integer documentId) { if ((files != null) && (files.length > 0)) { for (int i = (files.length - 1); i >= 0; i--) { File file = files[i]; FrmProgressDialog prog = new FrmProgressDialog( Messages.getString("panel.content.documents.addDocument"), Messages.getString("panel.content.upload.ParseFile"), 100); prog.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); try { String fext = Utils.getExtension(file); String mimetype = Utils.getMimeType4Extension(fext); if (mimetype.equals("")) { mimetype = "application/octet-stream"; } prog.setProgress(Messages.getString("panel.content.upload.Uploading"), 50); String password = null; if (mimetype.equals("application/pdf") && PdfUtils.isPassswordProtected(file)) { DlgPdfDocumentPassword dlgPdfDocumentPassword = new DlgPdfDocumentPassword(password); dlgPdfDocumentPassword.setSize(350, 280); dlgPdfDocumentPassword.setLocationRelativeTo(UIConstants.getMainFrame()); dlgPdfDocumentPassword.setModal(true); dlgPdfDocumentPassword.setVisible(true); dlgPdfDocumentPassword.pack(); password = dlgPdfDocumentPassword.getPassword(); } int existingDocId = -1; if (unit != null) { existingDocId = comm.getDocumentIdForNameAndUnit(file.getName(), unit); } else if (viewComponentId != null) { existingDocId = comm.getDocumentIdForNameAndViewComponent(file.getName(), viewComponentId); } else { throw new RuntimeException( "There must be at least one of unitId or viewComponentId present in method call"); } //this.intDocId = this.comm.addOrUpdateDocument(file, unit, file.getName(), mimetype, documentId); if (!isDataActualization) { if (existingDocId == 0) { try { DocumentValue documentValue = new DocumentValue(); // documentValue.setDescription(txtDocumentDescription.getText()); documentValue.setDocument(IOUtils.toByteArray(new FileInputStream(file))); documentValue.setDocumentId(documentId); documentValue.setDocumentName(file.getName()); // documentValue.setLabel(txtDocumentLabel.getText()); documentValue.setMimeType(mimetype); documentValue.setPassword(password); // documentValue.setSearchable(ckbDocumentSearchable.isSelected()); documentValue.setUnitId(unit); documentValue.setViewDocumentId(viewComponentId); this.intDocId = this.comm.addOrUpdateDocument(documentValue).getDocumentId(); } catch (InvalidSizeException e) { JOptionPane.showMessageDialog(UIConstants.getMainFrame(), e.getMessage(), rb.getString("dialog.title"), JOptionPane.INFORMATION_MESSAGE); return; } } else { DlgSaveDocument saveDialog = new DlgSaveDocument(file, unit, file.getName(), mimetype, existingDocId); int frameHeight = 280; int frameWidth = 350; saveDialog.setSize(frameWidth, frameHeight); saveDialog.setLocationRelativeTo(UIConstants.getMainFrame()); saveDialog.setModal(true); saveDialog.setVisible(true); } } else { if ((existingDocId == 0) || (file.getName().equalsIgnoreCase(selectedDocName))) { try { DocumentValue documentValue = new DocumentValue(); documentValue.setDescription(txtDocumentDescription.getText()); documentValue.setDocument(IOUtils.toByteArray(new FileInputStream(file))); documentValue.setDocumentId(documentId); documentValue.setDocumentName(file.getName()); documentValue.setLabel(txtDocumentLabel.getText()); documentValue.setMimeType(mimetype); documentValue.setPassword(password); documentValue.setSearchable(ckbDocumentSearchable.isSelected()); documentValue.setAuthor(txtAuthor.getText()); documentValue.setCategory(txtCategory.getText()); documentValue.setUnitId(unit); documentValue.setViewDocumentId(viewComponentId); this.intDocId = this.comm.addOrUpdateDocument(documentValue).getDocumentId(); } catch (InvalidSizeException e) { JOptionPane.showMessageDialog(UIConstants.getMainFrame(), e.getMessage(), rb.getString("dialog.title"), JOptionPane.INFORMATION_MESSAGE); return; } } else if ((existingDocId != 0) && (!file.getName().equalsIgnoreCase(selectedDocName))) { JOptionPane.showMessageDialog(UIConstants.getMainFrame(), Messages.getString("dialog.saveDocument.imposibleToOverwrite"), rb.getString("dialog.title"), JOptionPane.INFORMATION_MESSAGE); } } } catch (Exception exe) { log.error("Error upload document " + file.getName(), exe); } finally { prog.setProgress(Messages.getString("panel.content.upload.Finished"), 100); prog.dispose(); prog.setCursor(Cursor.getDefaultCursor()); } } } }
From source file:ded.ui.DiagramController.java
/** Show the box with the key bindings. */ public void showHelpBox() { JOptionPane.showMessageDialog(this, helpMessage, "Diagram Editor Keybindings", JOptionPane.INFORMATION_MESSAGE); }
From source file:com.mycompany.zad1.MainWindow.java
private void laplasjanButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_laplasjanButtonActionPerformed String[] buttonsLabels = { "Lap1", "Lap2", "Lap3", "file" }; Laplacea laplacea = new Laplacea(); boolean flag = false; int result = JOptionPane.showOptionDialog(null, "Choose Mask", "Choose laplasjan mask", JOptionPane.INFORMATION_MESSAGE, 0, null, buttonsLabels, buttonsLabels[0]); switch (result) { case 0://from w w w . ja v a 2s. c o m System.out.println("1"); imageBuff = laplacea.computeImage(imageBuff, result); flag = true; break; case 1: System.out.println("2"); imageBuff = laplacea.computeImage(imageBuff, result); flag = true; break; case 2: System.out.println("3"); imageBuff = laplacea.computeImage(imageBuff, result); flag = true; break; case 3: int[][] mask = loadMask(); if (mask != null) { imageBuff = laplacea.computeImage(imageOrginal, mask); System.out.println("Robi"); flag = true; } break; } if (flag) imageMoiffayLabel.setIcon(new ImageIcon(imageBuff.getImage())); }
From source file:be.agiv.security.demo.Main.java
private void invokeClaimsAwareService() { GridBagLayout gridBagLayout = new GridBagLayout(); GridBagConstraints gridBagConstraints = new GridBagConstraints(); JPanel contentPanel = new JPanel(gridBagLayout); final JLabel ipStsLabel = new JLabel("IP-STS:"); gridBagConstraints.gridx = 0;/*from ww w .jav a 2 s .com*/ gridBagConstraints.gridy = 0; gridBagConstraints.anchor = GridBagConstraints.WEST; gridBagConstraints.ipadx = 5; gridBagLayout.setConstraints(ipStsLabel, gridBagConstraints); contentPanel.add(ipStsLabel); final JTextField ipStsTextField = new JTextField( "https://auth.beta.agiv.be/ipsts/Services/DaliSecurityTokenServiceConfiguration.svc/IWSTrust13", 60); gridBagConstraints.gridx++; gridBagLayout.setConstraints(ipStsTextField, gridBagConstraints); contentPanel.add(ipStsTextField); JLabel realmLabel = new JLabel("Realm:"); gridBagConstraints.gridx = 0; gridBagConstraints.gridy++; gridBagLayout.setConstraints(realmLabel, gridBagConstraints); contentPanel.add(realmLabel); JTextField realmTextField = new JTextField(AGIVSecurity.BETA_REALM, 30); gridBagConstraints.gridx++; gridBagLayout.setConstraints(realmTextField, gridBagConstraints); contentPanel.add(realmTextField); final CredentialPanel credentialPanel = new CredentialPanel(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy++; gridBagConstraints.gridwidth = GridBagConstraints.REMAINDER; gridBagLayout.setConstraints(credentialPanel, gridBagConstraints); contentPanel.add(credentialPanel); final JLabel rStsLabel = new JLabel("R-STS:"); gridBagConstraints.gridx = 0; gridBagConstraints.gridy++; gridBagConstraints.gridwidth = 1; gridBagLayout.setConstraints(rStsLabel, gridBagConstraints); contentPanel.add(rStsLabel); final JTextField rStsTextField = new JTextField( "https://auth.beta.agiv.be/sts/Services/SalvadorSecurityTokenServiceConfiguration.svc/IWSTrust13", 60); gridBagConstraints.gridx++; gridBagLayout.setConstraints(rStsTextField, gridBagConstraints); contentPanel.add(rStsTextField); JLabel serviceRealmLabel = new JLabel("Service realm:"); gridBagConstraints.gridx = 0; gridBagConstraints.gridy++; gridBagLayout.setConstraints(serviceRealmLabel, gridBagConstraints); contentPanel.add(serviceRealmLabel); JTextField serviceRealmTextField = new JTextField(ClaimsAwareServiceFactory.SERVICE_REALM, 60); gridBagConstraints.gridx++; gridBagLayout.setConstraints(serviceRealmTextField, gridBagConstraints); contentPanel.add(serviceRealmTextField); JLabel urlLabel = new JLabel("Service URL:"); gridBagConstraints.gridx = 0; gridBagConstraints.gridy++; gridBagLayout.setConstraints(urlLabel, gridBagConstraints); contentPanel.add(urlLabel); JTextField urlTextField = new JTextField(ClaimsAwareServiceFactory.SERVICE_LOCATION, 60); gridBagConstraints.gridx++; gridBagLayout.setConstraints(urlTextField, gridBagConstraints); contentPanel.add(urlTextField); final JCheckBox noWsPolicyCheckBox = new JCheckBox("WSDL without WS-Policy"); gridBagConstraints.gridx = 0; gridBagConstraints.gridy++; gridBagConstraints.gridwidth = GridBagConstraints.REMAINDER; gridBagLayout.setConstraints(noWsPolicyCheckBox, gridBagConstraints); contentPanel.add(noWsPolicyCheckBox); final JCheckBox useWsSecureConversationCheckBox = new JCheckBox("Use WS-SecureConversation"); gridBagConstraints.gridx = 0; gridBagConstraints.gridy++; gridBagConstraints.gridwidth = GridBagConstraints.REMAINDER; gridBagLayout.setConstraints(useWsSecureConversationCheckBox, gridBagConstraints); contentPanel.add(useWsSecureConversationCheckBox); final JCheckBox usePreviousSecurityCheckBox = new JCheckBox("Use previous AGIV Security"); final JCheckBox cancelPreviousSecureConversationToken = new JCheckBox("Cancel previous conversation token"); usePreviousSecurityCheckBox.setEnabled(null != this.agivSecurity); cancelPreviousSecureConversationToken.setEnabled(false); usePreviousSecurityCheckBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { LOG.debug("use previous security: " + usePreviousSecurityCheckBox.isSelected()); boolean newSecurity = !usePreviousSecurityCheckBox.isSelected(); ipStsLabel.setEnabled(newSecurity); ipStsTextField.setEditable(newSecurity); credentialPanel.setEnabled(newSecurity); rStsLabel.setEnabled(newSecurity); rStsTextField.setEnabled(newSecurity); cancelPreviousSecureConversationToken.setEnabled(!newSecurity); } }); gridBagConstraints.gridx = 0; gridBagConstraints.gridy++; gridBagConstraints.gridwidth = GridBagConstraints.REMAINDER; gridBagLayout.setConstraints(usePreviousSecurityCheckBox, gridBagConstraints); contentPanel.add(usePreviousSecurityCheckBox); gridBagConstraints.gridx = 0; gridBagConstraints.gridy++; gridBagConstraints.gridwidth = GridBagConstraints.REMAINDER; gridBagLayout.setConstraints(cancelPreviousSecureConversationToken, gridBagConstraints); contentPanel.add(cancelPreviousSecureConversationToken); JPanel expiresPanel = new JPanel(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy++; gridBagConstraints.gridwidth = 2; gridBagLayout.setConstraints(expiresPanel, gridBagConstraints); contentPanel.add(expiresPanel); JLabel expiresLabelLabel = new JLabel("Secure conversation token expires:"); expiresLabelLabel.setEnabled(null != this.agivSecurity); expiresPanel.add(expiresLabelLabel); JLabel expiresLabel = new JLabel(); expiresLabel.setEnabled(null != this.agivSecurity); expiresPanel.add(expiresLabel); if (null != this.agivSecurity) { if (false == this.agivSecurity.getSecureConversationTokens().isEmpty()) { SecurityToken secureConversationToken = this.agivSecurity.getSecureConversationTokens().values() .iterator().next(); expiresLabel.setText(secureConversationToken.getExpires().toString()); } } int dialogResult = JOptionPane.showConfirmDialog(this, contentPanel, "Claims Aware Service", JOptionPane.OK_CANCEL_OPTION); if (dialogResult == JOptionPane.CANCEL_OPTION) { return; } final String location = urlTextField.getText(); final String serviceRealm = serviceRealmTextField.getText(); final String ipStsLocation = ipStsTextField.getText(); final String rStsLocation = rStsTextField.getText(); final String username = credentialPanel.getUsername(); final String password = credentialPanel.getPassword(); final File pkcs12File = credentialPanel.getPKCS12File(); final String realm = realmTextField.getText(); ExecutorService executor = Executors.newFixedThreadPool(1); FutureTask<ArrayOfClaimInfo> futureTask = new FutureTask<ArrayOfClaimInfo>( new Callable<ArrayOfClaimInfo>() { public ArrayOfClaimInfo call() throws Exception { Service service; if (noWsPolicyCheckBox.isSelected()) { service = ClaimsAwareServiceFactory.getInstanceNoWSPolicy(); } else { service = ClaimsAwareServiceFactory.getInstance(); } IService iservice = service.getWS2007FederationHttpBindingIService(new AddressingFeature()); BindingProvider bindingProvider = (BindingProvider) iservice; if (false == usePreviousSecurityCheckBox.isSelected()) { if (null != username) { Main.this.agivSecurity = new AGIVSecurity(ipStsLocation, rStsLocation, realm, username, password); } else { Main.this.agivSecurity = new AGIVSecurity(ipStsLocation, rStsLocation, realm, pkcs12File, password); } Main.this.agivSecurity.addSTSListener(Main.this); if (Main.this.proxyEnable) { agivSecurity.setProxy(Main.this.proxyHost, Main.this.proxyPort, Main.this.proxyType); } } if (cancelPreviousSecureConversationToken.isSelected()) { Main.this.agivSecurity.cancelSecureConversationTokens(); } Main.this.agivSecurity.enable(bindingProvider, location, useWsSecureConversationCheckBox.isSelected(), serviceRealm); ArrayOfClaimInfo result = iservice.getData(0); return result; } }) { @Override protected void done() { try { ArrayOfClaimInfo result = get(); List<ClaimInfo> claims = result.getClaimInfo(); StringBuffer message = new StringBuffer(); for (ClaimInfo claim : claims) { message.append(claim.getName()); message.append(" = "); message.append(claim.getValue()); message.append("\n"); } JOptionPane.showMessageDialog(Main.this, message.toString(), "Claims Aware Service Result", JOptionPane.INFORMATION_MESSAGE); } catch (final Exception e) { try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { Main.this.statusBar.setErrorStatus(e.getMessage()); } }); } catch (Exception e1) { } showException(e); } } }; executor.execute(futureTask); }