public MXpence() throws IOException { Display mDisplay = Display.getDisplay(this);
//****************************************This Command for Welcome Screen************************************************************************ //welcome = new TextBox("Welcome (Set your trip expenses)", "Please fill all required field \n \n * This signify required field(s)", 200, TextField.UNEDITABLE);
//*********************************************This code section is for List All Trip Expenses Screen*********************************** mList = new List("All Trip Details", List.EXCLUSIVE); mList.addCommand(new Command("OK", Command.OK, 0)); mList.addCommand(new Command("Delete", Command.SCREEN, 1)); mList.addCommand(new Command("Add Expenses", Command.SCREEN, 2)); mList.addCommand(new Command("Delete All", Command.SCREEN, 3)); mList.setCommandListener(this); mvector = new Vector();
///*********************************************This code section is for Searching for a Trip to know its Expenses*********************** sList = new List("Search for a Trip", List.EXCLUSIVE); sList.addCommand(new Command("Ok", Command.OK, 1)); sList.addCommand(new Command("Expenses", Command.SCREEN, 0)); //sList.addCommand(new Command("Look Back", Command.BACK, 0)); sList.setCommandListener(this);
//*********************************************This code section is for Displaying a Trip Expenses************************************** dList = new List("Your Trip Expenses", List.EXCLUSIVE); dList.addCommand(new Command("Finish", Command.OK, 0)); dList.addCommand(new Command("Delete Expenses", Command.SCREEN, 1)); dList.addCommand(new Command("Sum Expenses", Command.SCREEN, 2)); dList.setCommandListener(this);
//**************************************************This Codes Section for Basic Details Screen*************************************************** basicDetails = new Form("MXpence Application"); ticker = new Ticker("Welcome User! Make your trip expenses easier"); basicDetails.setTicker(ticker); constraint = new StringItem("* This signify required field(s)", "", StringItem.PLAIN);
staffId = new TextField("*Staff Id:", "", 100, TextField.ANY); staffName = new TextField("*Staff Name:", "", 200, TextField.ANY); staffDepartment = new TextField("Staff Department(optional):", "", 100, TextField.ANY);
try { error = new Alert("", "One of the fiels is Empty", Image.createImage("/alert.jpg"), null); error.setTimeout(Alert.FOREVER); } catch (Exception e) { }
//*************************************************This code section is for Trip Details Screen************************************************** tripDetails = new Form("Enter your trip details");
tripPurpose = new TextField("*Purpose of the Trip:", "", 1000, TextField.ANY);
dtfDOT = new DateField("*Date of the Trip:", DateField.DATE); dtfDOT.setLayout(Item.LAYOUT_2 | Item.LAYOUT_LEFT | Item.LAYOUT_BOTTOM);
//********************************************This code section is for Search for Trip Expenses Screen***************************************************** search = new Form("Search for Expenses");
//*********************************************This code section is for Delete Alert**************************************************** try { Alerta = new Alert("Deleted! \n ", "", null, AlertType.ERROR); Alerta.setTimeout(1000); } catch (Exception e) { }
//**************************This is for adding expenses details*************************************************************************** expensesDetails = new Form("Enter details of expenses");
String tExp[]={"Select...","Food","Transport","Others"}; typeExpenses=new ChoiceGroup("Type of expenses",ChoiceGroup.POPUP,tExp,null); //typeExpenses = new TextField("*Type of Expenses:", "", 1000, TextField.ANY); amountExpenses = new TextField("*Amount of Expenses:", "", 100, TextField.NUMERIC); detailsExpenses = new TextField("*Details of Expenses:", "", 1000, TextField.ANY); addComments = new TextField("Additional Comments(optional):", "", 1000, TextField.ANY);
timeExpenses = new DateField("*Time of Expenses:", DateField.TIME);
constraints = new StringItem("* This signify required field(s)", "", StringItem.PLAIN); dis = new StringItem("", "", StringItem.PLAIN);
try { Confirm2 = new Alert("Data Saved! \n ", "One of the fiels is Empty", null, AlertType.CONFIRMATION); Confirm2.setTimeout(5000); } catch (Exception e) { }
try { errora = new Alert("Error! \n ", "One of the fiels is Empty", Image.createImage("/alert.jpg"), null); errora.setTimeout(Alert.FOREVER); } catch (Exception e) { } }
public void startApp() { mDisplay = Display.getDisplay(this); mDisplay.setCurrent(basicDetails); }
public void pauseApp() { }
public void destroyApp(boolean unconditional) { }
public void commandAction(Command c, Displayable d) { //***********************This Commands is for Exiting Welcome Screen*********************************************** if (c.getLabel().equals("Exit")) { notifyDestroyed(); }
//***********************This Commands is for initializing Basic Details Screen********************************************************** if (c.getLabel().equals("Next")) { checkBasicDetails(); } if (c.getLabel().equals("Confirm")) { addBasicDetails(); } if (c.getLabel().equals("Cancel")) { mDisplay.setCurrent(basicDetails); }
//***********************This Commands is for Saving Trip Details************************************************************************* if (c.getLabel().equals("Save")) { checkTripDetails(); } if (c.getLabel().equals("Add")) { addTripDetails(); } if (c.getLabel().equals("Back")) { mDisplay.setCurrent(tripDetails); } if (c.getLabel().equals("Close")) { staffId.setString(""); staffName.setString(""); staffDepartment.setString(""); mDisplay.setCurrent(basicDetails); } //***********************This Commands is for Listing all trip to either add Expenses or delete a trip*********************************************** if (c.getLabel().equals("List All Trip")) { listAllTrips(); } if (c.getLabel().equals("OK")) { mDisplay.setCurrent(tripDetails); } //*************************************This command is to delete a specific trip out of all trips*************************************** if (c.getLabel().equals("Delete")) { deleteSingleTrip(); }
//****************************************This is command is for Adding Expenses for a particular trip selected*************************** if (c.getLabel().equals("Add Expenses")) { mDisplay.setCurrent(expensesDetails); } if (c.getLabel().equals("Insert")) { checkTripExpenses(); }
if (c.getLabel().equals("Correct")) { addTripExpenses(); } if (c.getLabel().equals("Get Back")) { mDisplay.setCurrent(expensesDetails); }
if (c.getLabel().equals("Previous")) { mDisplay.setCurrent(tripDetails); } //***********************This Commands is for Searching for a Trip to add Expenses******************************************************* if (c.getLabel().equals("Search for trip")) { listPurpose.setString(""); mDisplay.setCurrent(search); } if (c.getLabel().equals("Search")) { searchForTrip(); } if (c.getLabel().equals("Back")) { mDisplay.setCurrent(tripDetails); } if (c.getLabel().equals("Ok")) { mDisplay.setCurrent(search); } //***********************This Commands is for Displaying Expenses for a particular trip*********************************************** if (c.getLabel().equals("Expenses")) { displayExpenses(); } if (c.getLabel().equals("Sum Expenses")) { sumAllExpensesForTrip(); } if (c.getLabel().equals("Finish")) { mDisplay.setCurrent(sList); } if (c.getLabel().equals("Delete Expenses")) { deleteExpenses(); } //***********************This Commands is for Deleting All the Trips Records*********************************************** if (c.getLabel().equals("Delete All")) { deleteAllTrip(); } }
private void checkBasicDetails() { String stId = staffId.getString(); String stName = staffName.getString(); boolean checking = true; if (stId == null || stId.trim().equals("")) { error.setString(stId); error.setString("Staff Id cannot be empty"); mDisplay.setCurrent(error); checking = false; } else if (stName == null || stName.trim().equals("")) { error.setString(stName); error.setString("Staff Name cannot be empty"); mDisplay.setCurrent(error); checking = false; } if (checking) { String stIds = staffId.getString(); String stNames = staffName.getString(); String stDepts = staffDepartment.getString();
// display the details to the user mCfmAlert.setString("Details Entered \n Staff Id:" + stIds + "\nStaff Name:" + stNames + "\nStaff Department:" + stDepts); mDisplay.setCurrent(mCfmAlert); } }
private void checkTripDetails() { String tpp = tripPurpose.getString(); String dot = dtfDOT.getDate().toString(); boolean checking = true; if (tpp == null || tpp.trim().equals("")) { error.setString(tpp); error.setString("Purpose of the Trip cannot be empty"); mDisplay.setCurrent(error); checking = false; } else if (dot == null || dot.trim().equals("")) { error.setString(dot); error.setString("Date of trip cannot be empty"); mDisplay.setCurrent(error); checking = false; } if (checking) { String tpps = tripPurpose.getString(); String dots = dtfDOT.getDate().toString();
// display the details to the user Check.setString("Details Entered \nPurpose of the trip:" + tpps + "\nDate of the trip:" + dots); mDisplay.setCurrent(Check); } }
private void addTripDetails() { try { if (rsa == null) { rsa = RecordStore.openRecordStore("DataTripManagement", true); } String dataToadd = tripPurpose.getString() + "," + dtfDOT.getDate().toString(); byte dataInByte[] = dataToadd.getBytes(); rsa.addRecord(dataInByte, 0, dataInByte.length); Confirm.setString("Data is saved. \n Total number of record is " + String.valueOf(rsa.getNumRecords())); mDisplay.setCurrent(Confirm, tripDetails); rsa.closeRecordStore(); rsa = null; } catch (RecordStoreException ex) { } tripPurpose.setString(""); dtfDOT.setDate(null); }
//i mean i did not use the mvector to save the id of the trip
private void listAllTrips() { mList.deleteAll(); try { if (rsa == null) { rsa = RecordStore.openRecordStore("DataTripManagement", true); } RecordEnumeration re = rsa.enumerateRecords(null, null, false); while (re.hasNextElement()) { int id = re.nextRecordId();
byte[] inByteFormat = rsa.getRecord(id); String record = new String(inByteFormat); mList.append("no." + id + "\n" + record, null); } rsa.closeRecordStore(); rsa = null; mDisplay.setCurrent(mList); } catch (Exception e) { } }
RecordEnumeration re = rsa.enumerateRecords(null, null, true); int n = re.numRecords(); strTempIDTrip = new String[n]; sList.deleteAll(); int i = 0; while (re.hasNextElement()) { int ID = re.nextRecordId(); String data = new String(rsa.getRecord(ID)); String productN = data.substring(0, data.indexOf(","));
Please help me fix this code - MobileApplications Pleasehelpmefix this code
Pleasehelpme in this area of code... in the background of the forms in this code
i want to sum all expenses amount... expenses)", "Please fill all required field \n \n * This signify required field
need to fix errors please help
need to fix errors please help it does have 2 errors what should i fix?
import java.io.*;
class InputName
static InputStreamReader reader = new...;
String name2;
System.out.println("please enter your name:");
name1= input.readline
please help me. pleasehelpme. Please send me a code of template in opencms and its procedure.so i can implement the code.
Thanks
trinath
urgent...pleAse help me.....please!
urgent...pleAsehelpme.....please! pleasehelpme urgent! how can i do dictionary with the use of array code in java, where i will type the word then the corresponding meaning for that word will appear...thanks
Please help me. Pleasehelpme. Hi i am trinath in below there is a url.In that url there is a code of edit a jsp page.I understand that code but only one thing i not get it i.e; What is the work of "id".and what is the data type of id?
http
please help me
before. This name list should get from the database. Pleasehelpme.
By the way, I'm using access database and jsp code.
Thank you...pleasehelp me Dear sir, I have a problem. How to write JSP coding
help me please helpme please how can i do dictionary with the use of array code in java, where i will type the word then the corresponding meaning for that word will appear...thanks
please how fix this error?
How to Fix Error
for this following code :
$var1 = $_POST["name"];
$var2 = $_POST["id"];
$st = 'INSERT INTO USERNAME(id,name) VALUES(:var1,:var2)';
$query = ociparse($con,$st);
OCIBindByName($st ,':va1',$var1
Please help me Pleasehelp me Hi Sir,
please send me the code for the following progrems...
1) all sets are integer type:
input:
set1={10,20,30,40}
set2={15,25,35}
output:
union={10,15,20,25,30,35,40}
2) input: "Hi what
please help me here pleasehelpme here please show me how can this show the right output that i need please continue doing this program using only if else and do while pleaseplease"
here is the problem
Automatic Teller Machine [B] Balance [D
please help me here pleasehelpme here please show me how can this show the right output that i need please continue doing this program using only if else and do while pleaseplease"
here is the problem
Automatic Teller Machine [B] Balance [D
please fix the error pleasefix the error org.apache.jasper.JasperException: Unable...: {
///////////@@@@the above mentioneed is error and code is as follows...; We have modified your code. Here is your modified code.
<%@ page
please help me to give code - Java Beginners pleasehelpme to give code Write a function with a signature cheerlead(word) that prints a typical cheer as follows. The word robot:
Gimme an R
Gimme an O
Gimme a B
Gimme an O
Gimme a T
What did you give me?
ROBOT
please help me to give code - Java Beginners pleasehelpme to give code Write a function, sliding(word, num)that behaves as follows. It should print out each slice of the original word having length num, aligned vertically as shown below. A call to sliding(examples, 4
please help me to give code - Java Beginners pleasehelpme to give code Write a program that prints an n-level stair case made of text. The user should choose the text character and the number of stairs in the stair case
*
**
***
****
Hi friend
please help me to give code - Java Beginners pleasehelpme to give code Write a program that uses loops to generate an n x n times table. The program should get n from the user. As a model here is a 4 x4 version:
| 1 2 3 4
please help me to give code - Java Beginners pleasehelpme to give code Write a program that reads a file named famous.txt and prints out the line with the longest length. In the case of a tie, you may print out only one of them. For example in the file:
Alan Turing
Help me please!!! - Java Beginners Helpmeplease!!! im badly needing the complete code for this project in java!!!
can you pleasehelpme???!!!
it is about 1-dimensional array... the answers 8Hours from now!!!
Kindly helpme!!
please!!please!!!
NOTE
please help me - Java Beginners pleasehelpme I have some error in this programe
//write acomputer programe using java to generate following series :
//output:
//1,2,3,0... have done modification in your code and here is the code according to the series
please help please help please send me the code of dynamic stack in java without using the built in functions
Please help me to modify my java code from php code
];
}
}
I tried like this (see below JSP code) ... but this is not giving me the exact result as the above PHP code is giving. So pleasehelpme to convert...Modify Java code from PHP Code i want to covert this php code int
help please
thing i want to imp in my app.please any one have app of this imp pls send me war file.. Or atleast helpme with code here.. I tried checking session alive...help please hi i am done with register application using jsps
Please help me to modify my java code from php code Pleasehelpme to modify my java code from php code i want to covert...) ... but this is not giving me the exact result as the above PHP code is giving. So please... same, as they alter it before. Pleasehelpme on this topic "how to order rows
help me help me please send me the java code to count the number of similar words in given string and replace that word with new one
Please help me... its very urgent Pleasehelpme... its very urgent Please send me a java code to check whether INNODB is installed in mysql...
If it is there, then we need to calculate the number of disks used by mysql
please any one can help me to write a code for this question? please any one can helpme to write a code for this question? Q 1) In a class first day 25 students are joined. After two days that total students will increased to 60. We can develop a program by using ArrayList concept
please help me. pleasehelpme. How to read a properties file in java with a suitable example.
Please send me.
Thanks
Trinath
Please visit the following link:
Java read properties file
please help me. pleasehelpme. Please send me the validation of this below link.
the link is http://www.roseindia.net/answers/viewqa/JSP-Servlet/9584-JSP-Servlet-Search-and-Edit.html
Thanks
Trinath
help me
the order,
Fourth button is Find length of text. and there are panels. Pleasehelpme. i want to write the code on this program. please share ur idea.
 ...help me Dear sir/medam
i would like to know how to use the java
please help me. pleasehelpme. How to move the edits.jsp in below link?
http://www.roseindia.net/answers/viewqa/JSP-Servlet/9584-JSP-Servlet-Search-and-Edit.html
please help me. pleasehelpme. I have a jsp page under that i add a list box under i get the countries through my database.
so how can i do
help me please helpmeplease Hello
I want helping for this question , Please
Write a program that reads some friends� names, stores them in an array, and then prints out on the screen all friends who start by a particular letter
please help me for this program - Java Beginners pleasehelpme for this program Write a program that asks the user for a starting value and an ending value and then writes all the integers...
11
12
13
14
Hi Friend,
Try the following code:
import
please help me. pleasehelpme. I have three table in mysql,and i hava create a excel sheet and add this sheet.but my question is in every sheet i can display one one table result.how can i do
please help me... pleasehelpme... write an application that print number in the following order using a FOR-Loop
1 2 3 4 5
2 4 6 8 10
3 6 9 1215
4 8 121620
5 10152025
please help me to this problem.. pleasehelpme to this problem.. i wrote a program like keyboard... inside the JTextField) but i want to make this program to let me write where i clicked (i.e allows me to write any thing at the field where i clicked
Please help me Pleasehelp me program for when a user enter his card number, it has to create default security pin in the database
could anyone please help with the code.
could anyone pleasehelp with the code. protected void doPost...(request, response);
}
}
could anyone please check the code. If i enter the correct username and password it redirects me to the correct page but if I enter
please help me pleasehelp me interface Test1 { String toString(); }
public class Test {
public static void main(String[] args) {
System.out.println(new Test1() {
public String toString() { return "test
please help me to solve this question about array pleasehelpme to solve this question about array write a program...() > 1)
System.out.println("It is not character. Please enter....");
}
}
}
Is this code is fruitful for you.
+++++++++ knapster +++++++++
 
Please help me urgent........... Pleasehelpme urgent........... For what kind of a problem would use a Tree Set and not a Tree Map
For what kind of a problem would use a Tree Map and not a Tree Set
Hello Friend,
If you want to display the list
please help me? pleasehelpme? Define a class named Circle with the following properties:
List item
An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both
Please help me?? Pleasehelpme?? Question_1: Using one-dimension array of primitive type elements.
Objective: The purpose of this lab exercise is to practice how to declare, create and manipulate a one-dimension array of primitive type
ajax code please help to solve this........
ajax codepleasehelp to solve this. in this i am trying to get data... null;
}
pleasehelpme
when i am running this it show an error...;<a href="help.jsp">help instruction</a></li>
<