• 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
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Any JCalendar package users??

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, my name is Dan and I'm a newb. I am using a JCalendar package from http://www.toedter.com/en/jcalendar/.

I created a simple applet where I am using the JDateChooser class. I compiled my applet and got no errors. But I get this error at execution time:
java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(Unknown Source)
at com.toedter.calendar.JDateChooser.<init>(JDateChooser.java:172)
at com.toedter.calendar.JDateChooser.<init>(JDateChooser.java:111)
at CalendarApplet.init(CalendarApplet.java:19)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "thread applet-CalendarApplet.class" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Here's my simple applet code:


Funny thing is, if I go back to the applet code above and substitute JDateChooser with JCalendar, it works without problems. Any ideas why I'm having problems with JDateChooser? Thanks.

-Dan
 
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Dan-

Welcome to JavaRanch.

I can only report that the applet works fine on OS X, so I can't guess why it might cause problems elsewhere. Maybe someone else can try it on Windows.
 
Dan Kim
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ulf, thanks for the welcome.

Well...I compiled the applet using Java SDK 1.5.6 on WinXP machine. What's also weird is, I just created a regular Java application, not applet, again using JDateChooser class and it works fine with no problems. This is driving me nuts. For some reason, I can't use the JDateChooser class in an applet environment on my machine. I tried to download an earlier version of the JCalendar (1.1.4) package, but it doesn't have the JDateChooser class. I prefer to use the JDateChooser class since it is more compact, doesn't take as much space as the JCalendar class. I tried using both Firefox browser and IE, still no go on my machine. Oh well.

I e-mail Mr. Kai Toedter, hopefully he can help. I guess for the time being I can live with using the JCalendar class. Thanks again.

-Dan
 
Dan Kim
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If anyone's interested, apparently the JDateChooser class does not work with JRE 1.5 update 6. Dunno about earlier updates. I uninstalled 1.5 and installed 1.4 update 10. My applet now works. I already sent Mr. Toedter an e-mail to inform him of this.
 
Shiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic