Robert Hendry

Greenhorn
+ Follow
since Oct 19, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Robert Hendry

I have been able to write MIDlets that use a db. Look up the RecordStore class. This class maps DIRECTLY to a palm DB.
For example if you have a Java RecordStore named "mystuff", a palm db will be created as "mystuff.pdb". When you hot sync, the mystuff.pdb file will be automatically transferred to the host.
Here is some example code the will write a record to a RecordStore
try{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
dos.writeUTF("Bob Hendry");
dos.writeUTF(34);
dos.writeUTF("123.45");
byte[] b = baos.toByteArray();
db.addRecord(b, 0, b.length);
t.delete(0,t.size());
t.insert("Record Inserted",0);
}
catch(Exception e){
t.delete(0,t.size());
t.insert(e.getMessage(),0);
}
23 years ago
Hello,
I am trying to left align an Image on a form but it ALWAYS shows up on the right. The Code is
Form frmLogin = new Form("AMOS Login");
Image img ;
try{
img = Image.createImage("/midp/uidemo/anl.png");
frmLogin.append(new ImageItem,"",img,ImageItem.LAYOUT_LEFT,""));
}
catch(Exception ex){
frmLogin.append("Cannot Load Image");
}
When displayed on the Palm, it looks like the layout is meaning less. The image is on the right all the time. Any ideas how to get it on the RIGHT??
Tx!
Bob....
23 years ago