java - How to set value of JSpinner to a certain date -


i have jspinner add jpanel set time :gregoriancalendar calendar

jspinner spinner = new jspinner(); spinner.setmodel(model); pom.add(new jlabel("date", jlabel.right)); pom.add(spinner); 

how achieve illegalvalue exceptions.

one should do:

        spinnerdatemodel model = new spinnerdatemodel();         model.setcalendarfield(calendar.day_of_year);          jspinner spinner = new jspinner();         spinner.setmodel(model);          simpledateformat format = new simpledateformat("dd/mm/yyyy");         java.sql.time time = new java.sql.time(osoba.getdatazatrudnienia().gettime().gettime());         spinner.setvalue(time); 

Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -