other form

other form

Can I write this code in other form:

if (quantity>=5) { System.out.println("Congrats!! You get a discount of 5%."); } else { System.out.println("you can avail a discount of 5% when you make a purchase of 5 items."); }

View Answers

February 12, 2011 at 5:01 PM

You can use JOptionPane.showMessageDialog() to display the above messages. Moreover, you can also use Label.setText() method to display the message.









Related Tutorials/Questions & Answers:
other form
other form  Can I write this code in other form: if (quantity>=5) { System.out.println("Congrats!! You get a discount of 5%."); } else { System.out.println("you can avail a discount of 5% when you make a purchase of 5 items
upload file and insert other details to database using a single form
upload file and insert other details to database using a single form   hi.. I have problem with uploading a file and insert other user datas together... but my other details seem to be null
Advertisements
Fetching data from excel file on other website and display in interactive graph form
Fetching data from excel file on other website and display in interactive graph form  Hello, I am making a website using HTML and CSS, I am done with the layout, I have to generate ineractive graphs like stock market's, Can you
form
form   Can I prevent a form from being submitted again
ZF Simple Form Creation
ZF Simple form creation: In the current tutorial we will study how to create a simple form in Zend Framework. We will use two ways to create  form, first one is pretty conventional way and other one is fully  ZF style. So
Data Provider or other service returned an E_FAIL status Error
Data Provider or other service returned an E_FAIL status Error       In was developing a form in Visual Basic and got the error "Data Provider or other service returned an E_FAIL status
form validation
form validation  how the form validation is done in jsf form using javaScript
ModuleNotFoundError: No module named 'other'
ModuleNotFoundError: No module named 'other'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'other' How to remove the ModuleNotFoundError: No module named 'other'
link to other frame - Applet
link to other frame  how a button to open to another frame? and the frame can keyin the data and it can show at the previous frame
print a form of *
print a form of *   * *** ***** ******* ********* ******* ***** *** *   Post the format properly
Other Base Packages
Other Base Packages I/O For handling i/o of an application in java , java.io & java.nio package is available. Object Serialization (adsbygoogle = window.adsbygoogle || []).push({}); Object Serialization provides
Multipage form
Multipage form  I have a multipage form in php with 2 pages wnhen i submit the form data from both the pages should go in database how should i pass teh data from 1st page to 2nd page and then put the entire form data in mysql
jsp form
jsp form  hi sir, one got one got in jsp form after entering the data into the form the data is not saving in the database i will send you code of two forms if dnt understand my problem
submit a form
submit a form  How can we submit a form without a submit button
Form handling
Form handling  I created a spring project. I created a jsp...;form:form name="loginForm" modelAttribute="loginForm" method="get"> <...;/td> <td> <form:input path="username"/>
Form Validation
Form Validation  Java script validation for checking special characters and white spaces and give an alert.Please help me urgent Thanks in advance
<form id=
form id  sir, <form id="reg1" action="../UploadingCtrl" method="post" enctype="multipart/form-data" name="form1"> this action page can't get String tp = request.getParameter("indegrates"). i wrote article upload
<form id=
form id  sir, <form id="reg1" action="../UploadingCtrl" method="post" enctype="multipart/form-data" name="form1"> this action page can't get String tp = request.getParameter("indegrates"). i wrote article upload
PHP form
PHP form  Hi Sir/Madam, I am developing an attendance form using php, which displays the name and ID of a Employees which are fetched from Db and I... form and update them to respective coloumn... Please any one help mo out please
Form validation
Form validation  Hi Everyone Can someone assist me with a complete code to validate a form. e.g where the user must insert an ID number it should check if the user entered the correct data and within a valid range. This must
Employee form
Employee form  In employee form emp Id id after any data iserted is incremented for oher data insertion. insert, delete, update buttons when we cleak the select buttoun then the created table data iserted automaticaly
struts form
struts form  Hi, This is Rajesh.I'm creating struts form in jsp.i have two textboxes in my jsp.During Jsp page loading focus will automatically should come to second textbox(That means during page loading cursor automatically
login form
login form  sir my next form consists logout button when i click on it it showing login form but next form window is not closing but the components prepsent in that form are getting clearedup using frameobject.setVisible(false
login form
login form  sir my next form consists logout button when i click on it it showing login form but next form window is not closing but the components prepsent in that form are getting clearedup using frameobject.setVisible(false
Login Form
of +,on clicking which a login form appears. Only the middle column is different
Login Form
of +,on clicking which a login form appears. Only the middle column is different
jsp form
jsp form  hai... GoodEvening I have one doubt on jsp.please wil u clarify it. how to move one jsp form to another jsp form with out using forward... page. 1)form1.jsp: <html> <form method="post" action="form2.jsp">
form submission
form submission  I have two pairs of textboxes...( so in total 4...("Enter text4 value!"); return false; } return true; } </script> <form name="form" method="post" onsubmit="return validate();"> <input type="text
JavaScript Form Validation
JavaScript Form Validation  JavaScript Form Validation
Other Operators in java 7
Other Operators in java 7 In this section you will learn about the Other Operators. This is one type of operators. Conditional Operator... can say ternary operator is short form of if-else statement. So it checks
form validation
form validation  <form name="form" method="post" action="process.php" onsubmit="return validate(); "> <table align="center" border="1px" bgcolor="orange" > <tr><td>username:</td><
about form
about form  how to dynamically increase the textbox in the 2nd form when i gave any value in textbox of form1 . if i gave 5 in the textbox of form1 , totally 5textbox have to be created in form2.   import javax.swing.
dynamic form
dynamic form  I need to make a dynamic form using php, for example, i... button wich once clicked we have a new list created on the same form. Thank you...); } } </script> <form method="post" action="" name="form1"> <
Dynamic form
Dynamic form  I need to make a dynamic form using jsp for example, i will need a list of items which when we select one option another list... clicked we have a new list created on the same form. Thanks for your help  
jQuery with other libraries
jQuery jquery with other Libraries  ... with other libraries. This issue comes as other libraries also uses $ to access... both jQuery and other libraries functions and variables. Using jQuery
jsp form
jsp form  hi i have one excuted jsp form.and in that the data should be dispaly on another jsp form.please help me thanks in advance   Hi Friend, Try this: 1)form1.jsp: <html> <form method="post" action
registration form
style="margin-top : 100px" align="center" border=0&gt; &lt;form
ModuleNotFoundError: No module named 'mc-other'
ModuleNotFoundError: No module named 'mc-other'  Hi, My Python...-other' How to remove the ModuleNotFoundError: No module named 'mc-other... to install padas library. You can install mc-other python with following
Selection based on other selection in jsp
Selection based on other selection in jsp  I am trying to create a jsp page. Where I am having a select list containing category name and for each category there are products which are taken from a ms access table using a java
The form tag
In this tutorial, you will learn about Spring form tag
form field issue
form field issue  how to set the values in form field and form field drop down (doc 2007) using Apache poi
focus to the first form field
focus to the first form field  How do I set the focus to the first form field
focus to the first form field
focus to the first form field  How do I set the focus to the first form field
the focus to the first form field
the focus to the first form field   How do I set the focus to the first form field
Action without a form.
Action without a form.  Can I have an Action without a form
Login form and registration
Login form and registration  I need a complete code for ligin and new user registration form and validation
php form post to mysql
php form post to mysql  How to post data into mysql database from the PHP post data form
HTML Form data into .CSV?
HTML Form data into .CSV?  how to store data from html form to csvfile in java
create a form using struts
create a form using struts  How can I create a form for inputting text and uploading image using struts
How to create form in Swings
How to create form in Swings  How to create registration, login and question form in Java Swing?   Creating different forms in Java Swing - Examples how to create registration form in swing swing login form example

Ads