Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Applet other form

Have Programming Question? Ask it here!
 
 
 


micheal
other form
1 Answer(s)      3 years and 7 months ago
Posted in : Applet


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."); }


Advertisement
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
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
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
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 Object Serialization provides the of objects' encoding into the stream of byte and also
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
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
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  how the form validation is done in jsf form using javaScript
print a form of *
print a form of *   * *** ***** ******* ********* ******* ***** *** *   Post the format properly
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
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
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...)form1.jsp: <html> <form method="post" action="form2.jsp"> <table>
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
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  
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
Other
Other      ... be useful to other developers as well. Currently there are: * com.nightlabs.ant... users to select and share code with other developers at http
registration form
="center" border=0&gt; &lt;form name="f1" action="CreateUser
How to change the dropdown values based on other dropdown in itext pdf or in any other?
How to change the dropdown values based on other dropdown in itext pdf or in any other?  How to change the drop down values based on another drop... one state that state related postal code only come in editable pdf form
linking php page to other php pages
linking php page to other php pages  How to link the PHP Page to other PHP page
Which class is extended by all other classes?
Which class is extended by all other classes?   Hi, Which class is extended by all other classes? thanks
Subtraction of a date from Sql and other from java.
Subtraction of a date from Sql and other from java.  I want to subtract a date that i retrieve from mysql database with the system date that i retrieve from java. I want the difference between the two date in the integer form
write Greek ( or other non-ASCII/8859-1 ) characters to a database
write Greek ( or other non-ASCII/8859-1 ) characters to a database  How do I write Greek ( or other non-ASCII/8859-1 ) characters to a database
How to Display Font Other than english
How to Display Font Other than english  How to display font other than english without using any files installed
How to move a file from a directory to other directory
How to move a file from a directory to other directory  I tried the above example it will move the folder to other directory but it does not move the image file or other file to a specified directory. Can anyone help me? Thanks
what is the Advantages moqui framework vs other frameworks
what is the Advantages moqui framework vs other frameworks  Can you please, tell me what is the Advantages moqui framework vs other frameworks.. Thanks in advance
JavaScript Form Validation
JavaScript Form Validation  JavaScript Form Validation
thread inside other thread - Java Beginners
thread inside other thread  Hello, can you help me please: I want to connect client and server that the client send three times msg1 and when he send msg2 he will connect with another server by create new thread that use
two select queries shouldn't depend on each other
two select queries shouldn't depend on each other   i want to write two select queries such that both queries shouldn't depends on each other .or how can i re-write this query? can i write this without using where
insert user session into other oracle database table
insert user session into other oracle database table   hello i am a doing my project in jsp-servlet. i have doubt that when a user login to his account after that i store his name into session and when the user write any
how to retrive other details with an image - Swing AWT
how to retrive other details with an image  hello I m trying to retrive an image as well as some other values from database.. but only image is displayed not other values.. canyou plz help me in solving this problem
Advertisements
 

 

 

DMCA.com