I am a new in the J2ME. I have searched a lot on the J2ME tutorial, but I did not find an answer. I am using the calendar component in LWUIT 1.4 and I want to set the selected date of the calendar into the textfield. I also used this link. But it did not work, it only shows the calendar and the getDate()
function did not work in the LWUIT 1.4. Please suggest any better books or tutorials for the J2ME with LWUIT 1.4.
here is my code:
txtDOB.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
// throw new UnsupportedOperationException("Not supported yet.");
final Form calFrame = new Form();
final Calendar cal = new Calendar();
calFrame.setScrollable(true);
calFrame.setSmoothScrolling(true);
calFrame.setIsScrollVisible(true);
cal.addDataChangeListener(new DataChangedListener() {
public void dataChanged(int arg0, int arg1) {
txtDOB.setText(cal.getDate()); //textfield which was shown error of unknown symbole.
ffregs.showBack();
}
});
calFrame.addComponent(cal);
calFrame.show();
}