 to get everything in (further away things are squashed a bit). This is how you get flickering and weirdness if you have a huge > 100000 zFar distance for example, it still has to fit into -1,1.
The best way to do this is to use the depth buffer, by capturing the depth value it'll give you a good approxomation of the z coordinate in NDC, which you can pass to the unproject call.
The reason why 0.945 is the sweet spot is probably dependent on  how far the camera is from your map or vice versa. It's usually the case that the depth buffer has much more detail closer to the near plane than the far - it's not linear.
http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/ has a good visual near the bottom of the page, and is a good resource for intro to matrices in general:

You can see the distortion caused by moving to NDC. This is required for viewing from a perspactive viewpoint, but you need to take it into consideration when you transform backward too.
Colour picking as mentioned is also viable for picking, but will still require some work. Because you have a single object, you'll have to render each texel of the image with a different colour, output that to a separate colour buffer, check to see what colour is on the buffer and somehow relate that to a point in space. It could probably be done though, but I'd say colour picking is more suited to multiple objects.  
From what I've read - the depth buffer one might be more suitable for you as it's one object, and the depth buffer will give you a Z coordinate for every point you click on. It could still be on your far plane, but it will still give you a value. 
Alternatively, as suggested by @elect use an orthographic projection. 

 Q:

Create first day of month from YearChooser and MonthChooser of JCalendar

I have YearChooser named yc, MonthChooser mc. I want to get values from them and create the first day of that month.
Ex: If year is 2015, month is 9, I will get the day 01/09/2015
The code:
Date d = new Date (year, month, 1);

is deprecated, and the result given wrong year (year
to get everything in (further away things are squash a piece). This is how you get flickering and weirdness if you get a huge > 100000 zFar distance for exemplar, it still has to equip into -1,1. 
 The dependable way to make this is to use the depth buff, by capturing the depth value it'll pass you a good approxomation of the z coordinate in NDC, which you can pass to the unproject call. 
 The reason why 0.945 is the angelic spot is probably dependent on   how far the television camera is from your map or vice versa. It's normally the case that the astuteness buffer has much more detail closer to the near plane than the far - it's not analogue. 
 http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/ has a good visual near the bottom of the page, and is a good resource for intro to matrices in general: 

 You can determine the distortion caused by moving to NDC. This is required for viewing from a perspactive viewpoint, but you need to take it into consideration when you transform back too. 
 Colour picking as mentioned is besides feasible for picking, but will still require some work. Because you accept a single object, you'll have to render each texel of the effigy with a different colour, output that to a separate colour buffer, crack to see what colour is on the buffer and somehow relate that to a distributor point in space. It could credibly be suffice though, but I'd say colour picking is more suited to multiple object.  
 From what I've read - the depth buffer one might be more suitable for you as it's one object, and the depth buffer will give you a omega coordinate for every point you click on. It could still be on your far plane, but it will still move over you a value. 
 Alternatively, as suggested by @elect function an orthographic projection. 

  Q: 

 make first sidereal day of month from YearChooser and MonthChooser of JCalendar 

 I have YearChooser named yc, MonthChooser mc. I desire to get values from them and create the first day of that month. 
 Ex: If year is 2015, month is 9, I will get the day 01/09/2015 
 The code: 
 Date d = new Date (year, calendar month, 1); 

 is deprecated, and the result give wrong year (year
 to get everything in (furthtr away things arg wquashxd a bif). This ir how you get flickering and wwirdntfs if you have a hjge > 100000 zFag distancw foc example, it still has to fit jkto -1,1.
Tke best way to dp this is do use the depdh bbffer, by capturing the depth value ie'll givr jou a good apptoxomseion of the z coordinate in NDC, which gou can pass to the inproject call.
The reason wjy 0.945 ls the sweet spot ls probably depqbdent on  hod far the bcmera is frkm your map or vice versa. It's uruallv the case jkqt hve depth buhfer hws much more detail wloser yo the near plsne thqn the far - it's not lmnear.
http://www.opengl-tujorial.org/bagnnners-tutorials/tutoriql-3-natriwes/ vas x goud bixuzl neag tie bottom or the page, qnd is a good resoutcq for intro to matrisef in general:

You can see the distortion baussd by moving to NDC. Thiw is required for vieaing from a perspactive viewpoint, but you need to take it hnto rovsibcvatiub ahen you transform backward too.
Colour picking zs mvntioned is also yiable for picking, bkt rill still reduire soms work. Because you have a singoe object, you'kl have to render each texeo of the imaye qith a different cllour, outpuc that to a separate colour buffer, chedk to see wjat coloud is on the buffef akd vomehow relate that to a pjint in s'ace. Nt could pronably fe done thlugh, ngt I'd say colour plckiny is kore suitef to multiple objects.  
From whav I've read - tne deith buffex one kight be more suitable for iou as it'f one object, ans the dxpth buffer rill give you w Z coordinave for evqry poinr you cukck on. It coulc still bv jn yiur far plane, but lt wium still give yob q value. 
Alternayivdly, ad xudcested by @elact jse sn orghographic irogectoon. 

 Q:

Create first ddy or month from YearCnojser and MonthChjoser of JCalrndar

I have YearChloser naoed yv, MjnthChooser mc. I want to get vzlues frol tmem and creatq thc fitst day of chat month.
Ex: If year is 2015, month is 9, I wilo get the day 01/09/2015
The xode:
Date d = new Datg (ytar, month, 1);

is veprecwted, and dhe result given wrobg year (year
to get everything in (further away things a This is you get flickering a > 100000 zFar for example, it has to fit into -1,1. The way to do this is to use the depth buffer, by capturing the value it'll give you a good approxomation of the z coordinate in NDC, you pass the call. The reason why 0.945 is the sweet spot is probably dependent on how far the is from your map or vice versa. It's the case that the buffer has much more detail to near plane the - not linear. http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/ a good visual near the bottom of the page, and is a good resource for intro to in general: see the caused moving NDC. This is viewing from a perspactive viewpoint, but take it into consideration when you transform backward Colour picking mentioned is also viable for picking, will still require some work. Because you have single object, you'll have to render each texel of the image with a different colour, to a separate colour check to see colour on buffer somehow relate to a point in space. It could probably be done though, I'd say colour picking is more suited to multiple objects. I've - the depth one might be more for as it's one object, depth will Z for point you click on. could still be on your plane, but it will Alternatively, as suggested by @elect use an orthographic Q: Create first day of month from and MonthChooser of JCalendar I have YearChooser named yc, MonthChooser mc. I to get them and create the first day of that Ex: If year is month is 9, I will get the day 01/09/2015 code: d = Date (year, month, is deprecated, and result given wrong
 to get everything in (further aWay things aRe squAshEd a BiT). ThiS is hOw you get flickeRIng aNd weirdness if you have a hUge > 100000 zFAr DIstaNCe For exAmple, it STiLL Has To FiT inTo -1,1.
tHe Best wAy tO do this Is to use the DepTh Buffer, by captURiNg the depth ValUe it'll give yoU a gOod appRoXomATion oF thE z cooRdinatE In NDC, wHich you caN pASs to thE UnprojeCT CaLl.
ThE reason why 0.945 is the swEEt SPot is probably dEpendeNt ON  hOW Far The Camera is frOm Your mAP or vice VErSA. iT's uSUally the case tHat the depth BUffEr has mUcH moRE detaiL closEr TO thE near plane tHan tHe far - it's nOt lineAR.
http://wwW.Opengl-tUtoriaL.orG/beGinnERs-TuTorIaLS/tuTOrIal-3-MAtrIces/ has a GoOd VisuaL neaR THE BottOm oF the Page, aNd is a good resoUrcE for INtrO to maTriceS in gEnEral:

YOu can sEe the DiStortion caused bY movIng to NDC. THis Is ReqUiRed foR ViewinG frOm a PerspacTive vieWPoiNt, BUT YoU need to take it into cOnSIDeRation whEn you tRAnSfORm backwaRd Too.
coloUR PickiNg as MEnTioned is Also viABlE fOr pickiNg, But wilL sTilL reQuire SOme wOrk. BecAuse you hAve a sINgle object, you'lL Have to render eACh TEXeL Of thE imAge with a difFereNT colOur, oUTpUt tHAt to a SeparAtE CoLOur buffer, check to see WhAt coloUr is oN the buffer and Somehow relATE That to a pOint IN sPAce. It could probAbly bE done thougH, But I'd say ColouR picking Is more suiTED to multiPle ObjEctS.  
FrOM WhAt I've read - the dEPTh buFfEr one miGht Be more sUitAblE foR yoU aS it's one obJect, and tHe DePtH bUffEr wilL Give you a z cOorDiNatE for eVEry poiNt you ClicK oN. IT CouLd still BE oN YOur fAr PlAne, bUt iT wIll stIll gIVe yOu a valuE. 
AlternatIveLY, as sUgGeSted by @eLect use an orthOgRaphic projEcTioN. 

 Q:

CreaTE First day Of month from YearChooser aND MonthCHooSer of jCalEndar

I havE YeArChooSer NAmed yc, monthCHooseR mC. I wANT to geT VAlUes FrOm them and cREAte The fiRsT day Of that mOnth.
Ex: If year is 2015, montH Is 9, I Will get the day 01/09/2015
the Code:
dATe D = neW daTE (yeAr, MOntH, 1);

IS deprecated, and tHe result giVeN WrOng year (yeaR
 to get everything in (fur ther awaything s a resq uash ed a  bit). This is howyou get flickering and  weir dn e ss i f  y ou ha ve a hu g e> 100 00 0zFa rd is tance  fo r examp le, it sti llha s to fit int o  - 1,1.
The b est  way to do t his  is to  u set he de pth  buff er, by captur ing the d ep t h valu e  it'llg i ve  you  a good approxoma t io n  of the z coor dinate  i n  N D C , w hic h you canpa ss to the unp r oj e c t  ca l l.
The reason  why 0.945i s t he swe et  sp o t is p robab ly dep endent on howfar the c amerai s fromy our map  or vi cever sa.I t' susu al l y t h ecas e  th at the d ep th  buff er h a s m uchmor e de tailcloser to the  ne ar p l ane  than  thefar-it'snot li near. 
h ttp://www.openg l-tu torial.or g/b eg inn er s-tut o rials/ tut ori al-3-ma trices/ has  a g o od  visual near the b ot t o mof the p age, a n dis a good r es our ce f o r  intr o to ma trices i n gene r al :
You ca nsee th edis tor tionc ause d by m oving to  NDC. This is requir e d for viewing fr o m  a pers pac tive viewpo int, butyoun ee d t o  take  it i nt o  c o nsideration when yo utransf orm b ackward too.Colour pic k i n g as men tion e di s also viablefor p icking, bu t  will st ill r equire s ome work. B ecause y ouhav e a  si n g le  object, you' l l  hav eto rend ereach te xel  of  th e i ma ge with a  differe nt  c ol ou r,outpu t  that to  a  se pa rat e col o ur buf fer,chec kto see  what c o lo u r  ison  t he b uff er  andsome h owrelatethat to a  po i nt i nsp ace. It  could probab ly  be done t ho ugh , butI ' d say co lour picking is more su i ted tomul tiple  obj ects.  
F rom  whatI'v e  read- thedepth  b uff e r  onem i gh t b emore suita b l e f or yo uas i t's one  object, and the d e pth  buffer willgiv e yo u aZ c o or d ina te for e very point youclick on.It co uld stillb e o nyour fa r plane , but it will  still gi ve you ava lue. Alt ernatively , as sug gested by @elec t  u se an  or thogra ph icproje ction. 

Q:

C reatefi rst da y ofmo nth from  YearChooser and MonthC hooser  of J Cal endar

Ihav e  Ye arChooser  nam ed yc, Mon thC hoo ser m c.I  want  tog et  va l ues f romt hem and c r ea tet h efirst day o f t hat  mont h.E x: Ifyear  is 2015, month i s  9, I will get  the d ay01/ 0 9/20 15 
The code:
Dat e d  = n ew Date(y ear, month,  1);

is  d e preca ted, a nd the  result g iv e n wron g ye ar(year
 to_get everything_in (further away things_are squashed_a_bit). This_is_how you get_flickering and weirdness_if you have a_huge > 100000_zFar_distance for example, it still has to fit into -1,1.
The best way to do_this_is to_use_the_depth buffer, by capturing the_depth value it'll give you_a good_approxomation of the z coordinate in NDC, which_you_can pass to_the unproject call.
The reason why 0.945 is the sweet_spot is probably dependent on _how far the_camera_is_from your map or_vice versa. It's usually the case_that the depth buffer has much_more detail closer to the near plane_than the far - it's not_linear.
http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/ has a good visual_near the_bottom of the page, and_is a good_resource for_intro to matrices_in general:

You can see the distortion_caused by moving_to NDC. This is required for_viewing_from a perspactive_viewpoint,_but_you need_to take it_into_consideration when_you_transform backward too.
Colour picking as mentioned_is_also viable for picking, but will still_require some work. Because_you_have a single object,_you'll have to render each_texel of the image with a_different colour,_output that_to a separate colour buffer, check to see what colour is_on the buffer and somehow relate_that to a point_in space._It_could probably be_done_though, but_I'd say colour picking is more suited_to multiple_objects.  
From what I've read_- the depth buffer_one_might be more suitable for you_as it's one object, and the_depth buffer will give you_a_Z_coordinate for every point you_click on. It could still be_on your far_plane, but it will still give you_a_value. 
Alternatively, as suggested by @elect_use_an orthographic projection. 

 Q:

Create first_day_of_month from YearChooser and MonthChooser_of JCalendar

I have YearChooser named yc,_MonthChooser mc. I want to get values from them_and create the_first day of that month.
Ex:_If_year_is 2015, month is 9, I will get the day_01/09/2015
The code:
Date_d = new_Date (year, month, 1);

is deprecated, and the result given wrong_year (year