Sangeeta Vepa

Greenhorn
+ Follow
since Sep 20, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sangeeta Vepa

Hi,
I stored a date from a datefield in rms. I had to convert it to a string to save it in the rms. Now, to put it back to the datefield to view i need to convert the string from rms back to date.
import java.text.*; doesn't work (it cannot be imported).
Thanks
Sangeeta
19 years ago
Hi Fred,
Can u send me a sample plz of the game table cells.

Thanks
Sangeeta
19 years ago
hi all,
Is there any object like LIST, say a FLEXGRID as in VB in which i can show data picked from RMS as a table. Say, for example ...
S.No in first column
Name in second column and so on ...
Actually, just wondering how can i display table structured reports.
Thanks
Sangeeta
19 years ago
Hi Lasse,
I am grateful for this prompt reply.
Let me specify what i want to do.
But i really need to implement this as i m drawing a rectangle based graph in which i have to fill int values only, as fillRect takes only int values.
Now its like an order entry form in which i take order values and show graphs for different clients.
So for every client i calculate the "Total Order Value" which is sum of a number of order for that particular client.
Now i pick up the largest "Total Order Value" for that set of clients.
To show it in a graph, i m filling the rectangles with the value of their orders horizontally. But the total width of a mobile application takes only 180 ( i mean getwidth() returns 180) which throws the graph outside the emulator. To solve this problem i m dividing each client's "Total Order Value" from the "Largest Order Value" and take percentage so that i can show the relative difference in the graph.
THATS WHAT THE PROBLEM IS : WHEN I DIVIDE THERE'S NOTHING THROUGH WHICH I CAN TAKE A PERCENTAGE AND "ROUND" IT OFF. THEN CONVERT THE DOUBLE VALUE TO "INTEGER" AND PUT IT IN drawRect(int,int,int,int).
How can i implement this in any other way.

Thanks
Sangeeta
19 years ago
Hi all,
I am writing a midp midlet in which i want to ROUND a value so that i can use that value in the graphics to fill a rectangle.
round(anyvalue) is available in java i suppose. But in am unable to import java.math.*.
I am using "Sun One Studio Update 1" to write the code. Please help, is there any other way in which i can store a decimal value into a integer variable.
Basically i want to strip off the decimal part from a value.
The value is stored in a double variable.
Another question: How can i print a double variable.
System.out.println("This is a double value " + variable); doesn't work. What Should be the typecast?
Thanks.
19 years ago
Hi Lasse,
I am saying i declared it as a flag to check whether "Next" button is pressed or "Prev" button is pressed. So, here either String or Integer flag can be taken. Both are not required.
Thanks
19 years ago
Hi all,
I have been coming across a peculiar problem. I created a midlet in which i enter orders and save data. I am still running the application in an emulator. Now, till now i could store data and also, edit them.
Suddenly, i m loosing data everytime i exit from the application in the emulator.
What can be the reason behind. I am using RMS to store data.
Thanks
19 years ago
Hi all,
I want to change the value of a string or integer which was declared at the top. I have initialized it in the constructor.
Now, i want to change its value when a button is pressed. Say "Next" or "Prev" and call repaint(). But i m unable to get the changed value.
Let me tell u why i need this:
I need to use a variable as a flag just to know that the particular button is pressed and execute some code in the paint method depending on the changed value received from the variable.
Basically, i want the prb to print "Next" when "next" button is pressed and to print "Prev" when "prev" is pressed.
Where am i doing wrong ... Please specify. Is there any problem in the place where i am initializing the integer or string.
import javax.microedition.midlet.*;
import java.lang.*;
import javax.microedition.lcdui.*;
import java.util.*;
import java.io.*;
/**
*
* @author SangeetaV
* @version
*/
public class ReportScreen extends Canvas implements CommandListener {
public String inextvalue;
private Command nextCommand;
private Command prevCommand;

public ReportScreen(VKJNewOrder midlet){

inextvalue = new String("abcd");
nextCommand = new Command("Next", Command.OK, 3);
prevCommand = new Command("Prev", Command.OK, 3);
this.addCommand(nextCommand);
this.addCommand(prevCommand);
this.setCommandListener(this);

}
protected void paint( Graphics g )
{
System.out.println("This is inextvalue : " + inextvalue);
}
public void commandAction(Command c, Displayable s)
{
if (c == nextCommand)
{
inextvalue = "Next";
this.repaint();
}
else if(c == prevCommand)
{
inextvalue = "Prev";
this.repaint();
}
}
}
19 years ago
Hi all,
I have a list which when selected puts the selected value into a textfield. Now whenever i select from the list it gives "array index out of bounds" exception.
"java.lang.ArrayIndexOutOfBoundsException: 1 >= 0"
Please specify where am i wrong. In the calling function or when it is defined in "VKJItem".
This is what i am doing: when the button is pressed
**************************************************************
try
{
// Get the record ID of the currently selected contact
int itemindexorder = orderItemSearchDisplay.getSelectedIndex();
int iditemorder = ((Integer)itemIDs.elementAt(itemindexorder)).intValue();
// Retrieve the CLIENT record from the database
VKJItem vkjitemorder = dbitem.getItemRecord(iditemorder);
// Initialize the CLIENT fields
orderitemField.setString(vkjitemorder.getItemName());
orderrateField.setString(vkjitemorder.getItemRate());
//Set the current display to ITEM ENTRY SCREEN
display.setCurrent(orderScreenDisplay);
}
catch(Exception e)
{
System.err.println(e);
}
***************************************************************
Code of VKJItem is as follows: Its a separate class. Is there any problem in "unpack" below.

import java.util.*;
public class VKJItem {

private String varitem, varpack, varrate;
public VKJItem(String i, String p, String r)
{
varitem = i;
varpack = p;
varrate = r;
}
public VKJItem(byte[] data) {
unpack(new String(data));
}
public void unpack(String data) {
int start = 0, end = data.indexOf(';');
varitem = data.substring(start, end);
start = end + 1;
end = data.indexOf(';', start);
varpack = data.substring(start, end);
start = end + 1;
varrate = data.substring(start, data.length());
}

public String pack() {
return (varitem + ';' + varpack + ';' + varrate);
}

public String getItemName() {
return varitem;
}

public String getItemPack() {
return varpack;
}
public String getItemRate() {
return varrate;
}
}
/* End of code VKJItem.java
*
*/

***************************************************************
19 years ago
Hi all,
I am writing an application in which i am using a textfield as a combo box. So as soon as the user goes to the textfield i donot want him to write anything in the textfield. I have created a list from which he would select the records. The list is ready but i am still left with making the textfield uneditable.
Could CONSTRAINT_MASK be of any use. Please pen me the syntax for the solution.
TIA
19 years ago
Hi all,
I am developing a mobile application in which i need to pick values from RMS and draw graphs. How can i draw graphs using j2me.
Please send any sample if possible
Thanks
19 years ago
hi all,
I would like to grab some information w.r.t. the combination of Tomcat, JBoss and Apache to start with. How do they work in unison.
TIA
Sangeeta
20 years ago
hi Lasse Koskela,
I m really sorry. That really was a mistake. Hope u wouldn't mind.
Anyways, thanks for the help.
Regards
Sangeeta
20 years ago