On Sep 2, 11:33 am, Carl Jokl <[email protected]> wrote: > I don't know if it helps to note that I found I could easily create > ugly UIs in .Net which had events and such. There are aspects of > the .Net windows forms library which are I could argue messier than > Java AWT or Swing. One example is that Java seems to have a very > standard > set of events which are available on all components i.e. mouse events > and key events.
Well except that you have to find the right interface and implement all the signatures which just kind of randomly have been grouped together there. That is, of course, unless you succeed in finding various adapter classes to hide the other stuff. You pretty much need to understand the Observer pattern (and week references etc.) to understand what's going on. By having events be first class constructs, and method-handle based rather than interface based, you facilitate far easier wiring up. > Going back to the events, there was a need to fire something on either > a mouse down or key down (I can't remember exactly) event on a > ComboBox on .Net. The event required was not available so the only way > to do it was to tap into the native messages and respond to it there. Yeah isn't that a nice, not to be left completely in the cold when you need something? Consider a similar scenario in Java, where your component wants to know when the user changes locale so it can change formatting; there is no LocaleManager emitting events (a kin to UIManager) so your only alternative is to subclass each and every component and try to wire this together manually hooked up to some polling mechanism. On .NET, you'd just intercept a call from the underlying native system (WM_SETTINGSCHANGE on Windows). > For all > this .Net is generally touted as being better for UI. I am not sure I > agree with this. Well most people would disagree with that though, although Matisse was a step in the right direction, even using that will inevitably end with NetBeans failing to render the WYSIWYG view. .NET has partial classes, which forms a natural separator between machine generated code and hand crafted code. Trying to juggle the locked lines within NetBeans and the accompanying XML layout file is cumbersome. Drag-and- drop UI development for Java has always sucked. Smart people being burned enough times won't even try doing this, but go directly to MigLayout or similar. -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
