• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

make jdatechooser and jyearchooser as non editable

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

can anybody show me how to make the
jmonthchooser and jyearchoosr as non editable.

i could make the jdatechooser as non editable by
using the following statements

((JTextFieldDateEditor)jDateChooser3.getDateEditor()).setEditable(false);

but i could not find anything similar to this for month and year chooser

please help

regards,

Ivin
 
ivin jacob
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its a class from the library jcalendar.jar

jmonthchooser and jyearchooser areswing components available in the library used for selecting month and year.

i got it done by the following snippet

{code}

JSpinner spinner = (JSpinner)jYearChooser1.getSpinner();
((javax.swing.JTextField)spinner.getEditor()).setEditable(false);

{code}

Thanks,

Ivin
reply
    Bookmark Topic Watch Topic
  • New Topic