Ok, so let's have another SWING debate/discussion.
A simple example of this is why have a JTextArea class that does not have a JScrollPane already? How many time have you used a JTextArea without a JScrollPane? And why have 3 different Text classes?
Another point I would like to mention is why Sun would choose to go with a Single L&F for every platform?
I think Sun should completely rethink and redo the SWING API and what they should do is enhance the AWT. The reason for this I must concede is performance. Making native calls to the OS is faster than drawing all your own components. My point is WHO CARES IF IT LOOKS THE SAME ON EVERY OS!
Now what I do know is that SWING uses the Graphics2D API to draw all of it's components. What I don't know is does the Graphics2D API make native OS calls to do what it does?
It is my opinion that Sun/JAVA has already lost the Desktop war. I have used Netbeans and I have used Eclipse. Netbeans 3.5 performs considerably better than previous versions. However, Eclipse still out performs it. Why? Because Eclipse uses Native DLL's. What would be so hard about Sun using Native calls to render GUI components? They already have platform dependent JRE's. The byte code will still run the same on every platform. The VM just makes the appropriate adjustments just as it already does.
I am almost done ranting on about this, but I would really like some feedback from everyone as to why they believe Sun chose the Universal L&F approach? Why not just extend the AWT? And also, what is Sun doing with the Graphics2D API to help improve SWING with the Tiger release?
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Nathan, I really respect your input and I don't disagree with you because I think you are wrong. I just want to make sure all the points are made and that I understand the reasons for everything
I also realize that this thread is not going to change the way Sun does anything. But the more WHY that I know, the better programmer I can become. Thanks.
My mistake. A "pluggable" look and feel. But I still say WHO CARES?
Most of the better looking L&F's (like kunstoff) perform horribly anyway. And when I say perform, I mean the same app compared with different L&F's.
So then the performance hit is JAVA and not SWING? You cannot say that a SWING Component performs as well or dare I say better than say an SWT app. And the reason I compare a one JAVA app with another (Eclipse vs Netbeans or SWT vs SWING) is for the very reason that they both are JAVA. SWT is faster (I think) because of the native OS calls for rendereing the GUI. Am I wrong? And I have yet to come accross a situation where I was like "I wish SWT had this component". Most modern OS's provide all the components you would ever need. (IMHO)
Agreed. And my favorite thus far is QT. A multiplatform GUI Toolkit for C++. You can take your Code and compile it on whatever platform you need. So it's a step further than JAVA where the compiled byte code works on any platform. QT has compilers for ever platform including MAC now.
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Consider Paul's rocket mass heater. |