of Unicode & J

In recent discussion with my girl, she said that why don't we have an Islamic calendar inside her handphone (i couldn't remember why she want them tho..) ? so, I went searching for it, and found two, a Persian/Arabic midlet (yet to be tested) and another old one (B/W is old i'd say)..

Than i thought, why dont i make it myself, it'll be cool :lol:

so, Arabic character in Java is simply unicode, quoting mindprod :
Getting Arabic in Java is simpler than you might imagine. JTextArea and drawString automatically display Unicode Arabic right to left.
woaa, dead easy.. But is it just JTextArea only or what (yet to be known)..
and found a simple applet, doing some drawString on the canvas
import java.applet.*;
import java.awt.*;

public class Arabic extends Applet {

public void init() {
setBackground(new Color(225,225, 255));
}

public void paint(Graphics g) {
g.setFont(new Font("Serif", Font.BOLD, 25));
g.drawString("\u062a\u062d\u064a\u0629 \u0644\u0644\u0639\u0627\u0644\u0645", 10 , 25);
}
} // END OF Class Arabic
so, what does some unicode character has to do with Hijri calendar? I have no idea :lol:

Aaaanyway, back to the calendar.. I was thinking doing the conversion (Hijri to Gregory & vice versa) myself, with the formula and all.. but luckily, found icu (unfortunately, it's not Intensive Care Unit :lol:) which stands for International Components for Unicode, where it includes an Islamic calendar, phew..

But seriously, I dont think icu can be fitted inside a midlet, so i was thinking delving into the source code to find the formula (i can't help it, just luv those formula :lol:)

Roger & out..

update:
found another calendar from joda, and its calculation's name :lol:
it's simply called arithmetic :P this might be easy enough..

No comments: