Re: [Microba-controls] Fatal issue with DatePicker and NetBeans' Matisse GUI builder.
Brought to you by:
michaelbaranov
From: Witold S. <plj...@gm...> - 2006-11-14 19:48:27
|
Hi there, I looked closer at the exceptions and I attached only one, that was thrown by NetBeans after the exception that was thrown by DatePicker... The real cause is ClassCastException in class: com.michaelbaranov.microba.calendar.ui.basic.BasicDatePickerUI method: installUI(JComponent c) peer = (DatePicker) c; <-- ClassCastException I patched CalendarPane#updateUI() as you said, but that didn't help :( There is stack trace in the attachment (I hope that is full stack trace, don't have idea how to get anything more verbose). For your convenience I used version 0.4.3.3 before applying your patch, so the line numbers will be valid. Answering your earlier question: NetBeans is throwing that exception in while developing, there is no problem at runtime. If you would like to reproduce my problem you would have to download NB 5.5 and follow my steps described in my first email of that thread: http://www.netbeans.org/servlets/ReadMsg?list=nbui&msgNo=8666 I know that the steps above could take lot of your time, so if I can help somehow :), just write. 2006/11/14, Michael Baranov <mic...@gm...>: > Witold, > > one more thing: > please update the CalendarPane#updateUi() with this and tell me if if > fixes the trouble: > > public void updateUI() { > ComponentUI delegate = UIManager.getUI(this); > if (delegate == null) { > Microba.init(); > delegate = UIManager.getUI(this); > } > setUI(delegate); > invalidate(); > } > > > Michael. > > Hello there, > > I am developing application using NetBeans 5.5 and its GUI builder. > > I had a problem with Matisse throwing exception one one of my forms > > and that exception was caused by some problem with Microba DatePicker. > > I do not know much about Swing's internals, but let me show you the > > answer from Sun employee regarding my problem: > > > > The exception you attached is probably caused by a bug in the GUI builder > > (would be worth reporting in IssueZilla), however it is caused but another > > exception - DataPicker component fails on instantiation (thus the layout > > loading fails). > > > > ---------------------------------------------------------------------------- > > Subject: Re: Matisse is throwing exception until I restart NetBeans > > Tomas Pavek wrote: > > ---------------------------------------------------------------------------- > > When you compile the other form and reopen the WizytyForm form, a new > > classloader is used to load the classes - so new version of DataPicker class > > is loaded, but it probably interacts with the old version of the > > BasicDatePickerUI. If you restart, everything seems ok - when the class is > > loaded first time. > > > > Would be good to investigate why this happens... especially the > > CalendarPane.updateUI method - how it gets the UI delegate. > > ---------------------------------------------------------------------------- > > here is entire context: > > http://www.netbeans.org/servlets/BrowseList?list=nbui&by=thread&from=650541 > > ---------------------------------------------------------------------------- > > > > I really do find Microba's DatePicker better than other date-related > > widgets (for example the way it deals with null values). Could you > > guys, take a look at that problem and tell me if you are able to fix > > that issue? > > NetBeans is now very popular, its GUI builder is going to be even more > > powerful, so resolving that could help others as well. > > > > Cheers, > > W.Szczerba > > > > ------------------------------------------------------------------------- > > SF.net email is sponsored by: A Better Job is Waiting for You - Find it Now. > > Check out Slashdot's new job board. Browse through tons of technical jobs > > posted by companies looking to hire people just like you. > > http://jobs.slashdot.org/ > > _______________________________________________ > > Microba-controls mailing list > > Mic...@li... > > https://lists.sourceforge.net/lists/listinfo/microba-controls > > > > > > |