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:javaresturentdesktopclient.BillingPage.java
private void jButtonremoveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonremoveActionPerformed // TODO add your handling code here: String mealNo = jTextFieldMealno.getText(); System.out.println("Hello meal remove"); ServletRequest.setServletRequest(Constant.BILLING_SERVLET); List<NameValuePair> paramLis = new ArrayList<>(); paramLis.add(new BasicNameValuePair(Constant.KEY_COMMAND, Constant.KEY_MEAL_DELETE)); paramLis.add(new BasicNameValuePair(Constant.KEY_MEAL_ID, mealNo)); paramLis.add(new BasicNameValuePair(Constant.KEY_TRANSACTIONID, transactionId.toString())); String response = HttpClientUtil.postRequest(paramLis); if (response.equalsIgnoreCase("success")) { JOptionPane.showMessageDialog(null, "Deleted", "Information", JOptionPane.INFORMATION_MESSAGE); jTextFieldMealno.setText(null);//from w w w . j a va 2s . c o m MealNo--; ShowTable(transactionId); } else { JOptionPane.showMessageDialog(null, "Failed!" + "\n please give Meal No, thank you", "Error Message", JOptionPane.ERROR_MESSAGE); } }
From source file:ar.com.mantinanmatias.calculadoraderivadas.Interface.java
private void jMenuDesarrolladorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuDesarrolladorActionPerformed JOptionPane.showMessageDialog(null, "Este software fue creado por Matas Mantian", "Informacin del desarrollador", JOptionPane.INFORMATION_MESSAGE); }
From source file:com.t3.client.TabletopTool.java
/** * Displays a dialog box with a predefined title and type, and a message * crafted by calling {@link #generateMessage(String, Throwable)} and * passing it the two parameters. Also logs an entry using the * {@link Logger#info(Object, Throwable)} method. * <p>/*from w w w .jav a2s . c om*/ * The title is the property key <code>"msg.title.messageDialogInfo"</code>, * and the dialog type is <code>JOptionPane.INFORMATION_MESSAGE</code>. * * @param msgKey * the key to use when calling {@link I18N#getText(String)} * @param t * the exception to be processed */ public static void showInformation(String msgKey, Throwable t) { String msg = generateMessage(msgKey, t); log.info(msgKey, t); showMessage(msg, "msg.title.messageDialogInfo", JOptionPane.INFORMATION_MESSAGE); }
From source file:userInterface.HospitalDoctor.HospitalDoctorWorkAreaJPanel.java
private void sendAlertBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendAlertBtnActionPerformed int selectedRow = vitalSignjTable.getSelectedRow(); if (selectedRow < 0) { JOptionPane.showMessageDialog(null, "Please select a row", "WARNING", JOptionPane.WARNING_MESSAGE); return;/*from w w w. j av a2 s. c o m*/ } else { VitalSign vs = (VitalSign) vitalSignjTable.getValueAt(selectedRow, 1); if (vs.getAlertStatus().equals("Requested doc")) { vs.setAlertStatus("Doc Reviewed"); HospitalWorkRequest request = (HospitalWorkRequest) vitalSignjTable.getValueAt(selectedRow, 0); Date responseDate = new Date(); request.setReceiver(userAccount); String alert = messageTxt.getText(); request.setAlert(alert); request.setRequestDate(responseDate); String severity = severityTxt.getText(); request.setSeverity(severity); request.setStatus("checked by doctor"); populateAlertsTable(); JOptionPane.showMessageDialog(null, "Doctor's Response Sent", "MESSAGE", JOptionPane.INFORMATION_MESSAGE); } else { JOptionPane.showMessageDialog(null, "Doctor has already reviewed", "MESSAGE", JOptionPane.INFORMATION_MESSAGE); } } }
From source file:com.floreantpos.ui.views.SwitchboardView.java
protected void doCloseOrder() { Ticket ticket = getFirstSelectedTicket(); if (ticket == null) { return;/* ww w .java 2 s. c o m*/ } ticket = TicketDAO.getInstance().loadFullTicket(ticket.getId()); int due = (int) POSUtil.getDouble(ticket.getDueAmount()); if (due != 0) { POSMessageDialog.showError(this, Messages.getString("SwitchboardView.5")); //$NON-NLS-1$ return; } int option = JOptionPane.showOptionDialog(Application.getPosWindow(), Messages.getString("SwitchboardView.6") + ticket.getId() + Messages.getString("SwitchboardView.7"), //$NON-NLS-1$//$NON-NLS-2$ POSConstants.CONFIRM, JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE, null, null, null); if (option != JOptionPane.OK_OPTION) { return; } OrderController.closeOrder(ticket); //tickteListViewObj.updateTicketList(); updateTicketList(); }
From source file:edu.harvard.i2b2.patientMapping.serviceClient.IMQueryClient.java
public static String sendValidateKeyQueryRequestREST(String XMLstr) { try {//from w ww. j a va 2s.com SAXBuilder parser = new SAXBuilder(); String xmlContent = XMLstr; java.io.StringReader xmlStringReader = new java.io.StringReader(xmlContent); org.jdom.Document tableDoc = parser.build(xmlStringReader); XMLOutputter o = new XMLOutputter(); o.setFormat(Format.getPrettyFormat()); StringWriter str = new StringWriter(); o.output(tableDoc, str); //jMessageTextArea.setText(str.toString()); //text.setText(str.toString()); MessageUtil.getInstance().setRequest("URL: " + getValidateKeyServiceName() + "\n" + str); OMElement payload = getQueryPayLoad(XMLstr); Options options = new Options(); targetEPR = new EndpointReference(getValidateKeyServiceName()); options.setTo(targetEPR); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE); options.setProperty(HTTPConstants.SO_TIMEOUT, new Integer(600000)); options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, new Integer(600000)); ServiceClient sender = new ServiceClient(); sender.setOptions(options); OMElement responseElement = sender.sendReceive(payload); // log.debug("Client Side response " + responseElement.toString()); xmlStringReader = new java.io.StringReader(responseElement.toString()); tableDoc = parser.build(xmlStringReader); o = new XMLOutputter(); o.setFormat(Format.getPrettyFormat()); str = new StringWriter(); o.output(tableDoc, str); MessageUtil.getInstance().setResponse("URL: " + getValidateKeyServiceName() + "\n" + str); //responseElement.toString()); return responseElement.toString(); } catch (AxisFault axisFault) { axisFault.printStackTrace(); java.awt.EventQueue.invokeLater(new Runnable() { public void run() { JOptionPane.showMessageDialog(null, "Trouble with connection to the remote server, " + "this is often a network error, please try again", "Network Error", JOptionPane.INFORMATION_MESSAGE); } }); return null; } catch (java.lang.OutOfMemoryError e) { e.printStackTrace(); return "memory error"; } catch (Exception e) { e.printStackTrace(); return null; } }
From source file:view.FramePrincipal.java
private void jBtnExecutarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnExecutarActionPerformed if ("".equals(dirImagemPrincipal)) { JOptionPane.showMessageDialog(this, "Selecione uma Imagem Principal a ser Trabalhada ", "Aviso", JOptionPane.INFORMATION_MESSAGE); setaImagensPrincipais();/* w ww . j a v a 2s. c o m*/ } else { ExecutarProcesso(); } }
From source file:edu.ku.brc.specify.config.init.secwiz.UserPanel.java
/** * //from w w w.j a va 2 s . co m */ private void saveUserData() { boolean hasErrors = false; DBMSUserMgr mgr = DBMSUserMgr.getInstance(); PreparedStatement pStmtSp = null; PreparedStatement pStmtAg = null; try { String dbUserName = properties.getProperty("dbUserName"); String dbPassword = properties.getProperty("dbPassword"); String hostName = properties.getProperty("hostName"); if (mgr.connect(dbUserName, dbPassword, hostName, databaseName)) { pStmtSp = mgr.getConnection() .prepareStatement("UPDATE specifyuser SET EMail=?, Password=? WHERE SpecifyUserID = ?"); pStmtAg = mgr.getConnection().prepareStatement("UPDATE agent SET Email=? WHERE AgentID = ?"); for (UserData ud : userModel.getUserData()) { if (ud.isChanged()) { if (StringUtils.isNotEmpty(ud.getEmail())) { pStmtSp.setString(1, ud.getEmail()); } else { pStmtSp.setObject(1, null); } pStmtSp.setString(2, ud.getPassword()); pStmtSp.setInt(3, ud.getId()); int rv = pStmtSp.executeUpdate(); if (rv == 1) { ud.setChanged(false); } else { System.err.println("Error " + pStmtSp.getWarnings()); } if (StringUtils.isNotEmpty(ud.getEmail())) { String sql = String.format( "SELECT AgentID FROM agent WHERE SpecifyUserID = %d AND (Email IS NULL OR Email <> '%s')", ud.getId(), ud.getEmail()); Vector<Integer> agentIds = BasicSQLUtils.queryForInts(mgr.getConnection(), sql); for (Integer agentId : agentIds) { pStmtAg.setString(1, ud.getEmail()); pStmtAg.setInt(2, agentId); } if (pStmtSp.executeUpdate() != 1) { // error hasErrors = true; } } } } } } catch (SQLException e) { e.printStackTrace(); } finally { try { if (pStmtSp != null) pStmtSp.close(); if (pStmtAg != null) pStmtAg.close(); mgr.close(); } catch (SQLException e) { } } if (!hasErrors) { userModel.setPwdChanged(false); userModel.setChanged(false); saveBtn.setEnabled(false); mkKeysBtn.setEnabled(false); if (changedEMail) { changedEMail = false; SwingUtilities.invokeLater(new Runnable() { @Override public void run() { UIRegistry.loadAndPushResourceBundle("specifydbsetupwiz"); UIRegistry.showLocalizedMsg(JOptionPane.INFORMATION_MESSAGE, "SEC_EML_TITLE", "SEC_EML_MSG"); UIRegistry.popResourceBundle(); } }); } } }
From source file:UserInterface.PatientRole.ManageMyVitalSignsAndFitnessRecordJPanel.java
private void showVitalSignsChartJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showVitalSignsChartJButtonActionPerformed // TODO add your handling code here: ArrayList<Record> recordList = patient.getRecordHistory().getRecordList(); /*At least 2 vital sign records needed to show chart */ if (recordList.isEmpty() || recordList.size() == 1) { JOptionPane.showMessageDialog(this, "No Vital Signs or only one Vital Sign found. At least 2 Vital Signs records needed to show chart!", "Warning", JOptionPane.INFORMATION_MESSAGE); return;/*from w w w .j a va 2 s.c o m*/ } VitalSignsChartJPanel panel = new VitalSignsChartJPanel(userProcessContainer, userAccount, patientOrganization, enterprise, ecoSystem); userProcessContainer.add("VitalSignsChartJPanel", panel); CardLayout layout = (CardLayout) userProcessContainer.getLayout(); layout.next(userProcessContainer); }
From source file:ee.ioc.cs.vsle.editor.Editor.java
/** * Display information dialog to application user. * //from www.j av a 2 s.co m * @param title - information dialog title. * @param text - text displayed in the information dialog. */ public void showInfoDialog(String title, String text) { JOptionPane.showMessageDialog(this, text, title, JOptionPane.INFORMATION_MESSAGE); }