Xiao Qinglai

+ Follow
since Mar 19, 2003
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Xiao Qinglai

IMO, anytime a client want to bookflight, he should lock the record to be booked, no matter how many seats are available.
Given that we have:
A interface DataInterface resides in suncertify.db;
A interface RemoteData, which extends Remote, resides in suncertify.server;
Now we have a package named suncertify.client, in which package, we want to dynamicly change data's resource: either from local or from network.
We can write a class ClientData implements suncertify.db.DataInterface. ClientData works like a wrapper of RemoteData, that is, use try--catch to hide RemoteException.
Now, given we have suncertify.client.Client, we can set Client's data like this:

In this way, we can dynamicly change DataInterface in Client.
In one word, the point is to create a class (ClientData) to implement DataInterface, and to wrap RemoteData (that is, catch RemoteException in method, instead of throwing it).
[ July 16, 2003: Message edited by: Xiao Qinglai ]
[ July 16, 2003: Message edited by: Xiao Qinglai ]
plz pay attention to this method:
/************paint() of CanvasArea************/
public void paint(Graphics g){g.setColor(255, 0, 0); if(toDraw)g.drawString(txt,50,100, Graphics.TOP | Graphics.HCENTER);}
if toDraw is true, paint txt to screen;
if toDraw is false, do nothing --- instead, you should do this:
Font f = g.getFont();
g.fillRect(50, 100, f.stringWidth(txt), f.getHeight());
good luck
15 years ago
First you should stroe the (x, y) of your latest panited String; Whenever you are painting the nextString, repaint both area of oldString and newString.
like this:
repaint(xOfOldString, yOfOldString, widthOfOldString, heightOfOldString);
repaint(xOfNewString, yOfNewString, widthOfNewString, heightOfNewString);
15 years ago
Oh~~sorry for breaking rules here.
I've updated my displayed name(this time my real name).
15 years ago
Hi all,
I'm now coding for Motorola's 388.
Boss dont like standard components which extend javax.microedition.lcdui.Screen, he wants me to compose customed Form, List, Item, Alert, etc.
Since com.motorola.lwt provides a serie of components, I'm wandering whether to use these components to build my components or start from scratch.
I've to code not only for Motorola but alse Nokia, Simens, etc. com.motorola.lwt will no longer available in later develepment. Thus it seems I should not fall back on this motorola's package.
Has anyone done the same thing before? or Can u give me some hints on customize reusable components?
Thx in advance
Best regards,
15 years ago