Slashdot Mirror


New Desktop Features Of Next Java

bonch writes "Sun has posted the new desktop features of the next Java, codename Mustang. Improvements to Swing look and feel, OpenGL 2D renderer performance, AWT features such as the ability to add a tray/panel icon, and improved deployment capabilities."

29 of 283 comments (clear)

  1. It's worth noting... by AKAImBatman · · Score: 5, Interesting

    ...that mustang is also the first Java version to be developed under an Open Source type model. The CVS is open to guests over on http://www.java.net, thus allowing for immediate feedback and bugfixes. It has been a real boon for the gaming community, as they've been able to direct several key performance features.

  2. The look and feel of Swing. by chkorn · · Score: 3, Interesting

    Yeah! This is really something that should be made better.
    Always when I use some Swing based applications I'm remembered that the times of ugly GUI's aren't over yet.

    --
    chris
    1. Re:The look and feel of Swing. by TiMac · · Score: 3, Interesting
      They are improving the Windows and GTK Look and Feel...but I'm hoping also that either Sun or Apple tackle the Mac OS X look and feel of Java apps.

      Sure, you can code Cocoa apps in Java and use Java in those ways...but pure Java executables programmed in Swing still lack the complete purity of Mac OS X. Apple ships tools in the Developer Tools to improve Java (like Jar Bundler) but the UI still isn't perfect.

      --

    2. Re:The look and feel of Swing. by MassacrE · · Score: 5, Insightful

      Personally, I'd be happier if they completely dropped swing support on the Mac ,or at least removed aqua L&F.

      There is a proliferation of really horrid java applications on the Mac because people don't understand that you cannot WORA and have GUI make sense. Users of different operating systems have different needs and expectations, even when they are equivalent 'types' of users with relatively equal computer experience.

  3. alright.... by HTL2001 · · Score: 3, Funny

    Who spilled the java in my Mustang??!

    --
    By reading this, you have given me brief control of your mind.
  4. Dear jFirstPostBot by Letter · · Score: 5, Funny
    Dear jFirstPostBot,

    You would have succeeded, if only you had used the speedy next version of Java, codenamed Mustang.

    Letter

  5. SubPixel Rendering by aCapitalist · · Score: 5, Interesting

    It looks like they've finally addressed this issue, but I think Sun is a little late.

    Personally, I can deal with non-native look-n-feel, but when the fonts look like something circa 1988 on an Amiga, how can anyone take Swing seriously.

    I never understood why they couldn't use platform specific code for fonts, and if not possible then go into fallback mode and paint everything themselves.

    Swing has been a disaster. I believe it was the OTI guys (who now work on Eclipse and SWT) that told Sun not to go the route of "give me a handle to a brush and we'll paint everything ourselves", but some other group won that debate.

    And thank god for .NET/Mono being around to give Sun a little kick in the rear to get moving on things.

    1. Re:SubPixel Rendering by bnenning · · Score: 3, Interesting

      Swing has been a disaster. I believe it was the OTI guys (who now work on Eclipse and SWT) that told Sun not to go the route of "give me a handle to a brush and we'll paint everything ourselves", but some other group won that debate.

      Indeed. The implementation of AWT sucked, but it at least had the right idea: the host OS has facilities for drawing interface elements, so use them rather than reinventing the wheel. Apple's Swing L&F is halfway decent because they use native APIs to draw widgets, and according to the article Sun is now doing the same thing for Windows and Linux. Desktop Java would be in a much better state if they hadn't gotten sidetracked for years trying to make apps on every OS look identically bad.

      --
      How to solve most of our problems: 1.Lots of nuclear plants. 2.Cure aging.
  6. What I'd like to see is by ImaLamer · · Score: 5, Funny

    Screenshots!

    A story about desktops carry no weight with me unless there is pretty pictures.

  7. Re:Java Desktop by Lysol · · Score: 3, Insightful

    First off, no one said it's what we need. And regardless if you or I feel there might be no need for it (I personally use it daily), there are plenty of shops out there that do.

    And second, they're addressing a significant issue with Swing which is its pokyness. This is going head on with SWT , a 'feature' that Eclipse people have enjoyed for sometime. This also signifies Sun throwing in the towel on their whole Swing widget abstraction, abstraction, abstraction mantra in favor of using the native OS rendering widget facilities. This has been a major Java gripe for some time; why can't my Windows Java app look like a Windows app and why does it have to be do damned slow?!

    Should be interesting to see how these features/additions play out. Also, looks like Swing apps are finally getting native aa font support. This will please many as the text rendering in Java apps is still in the Windwos 2k/GTK 1.x days..

  8. Re:Java Desktop by REggert · · Score: 5, Informative

    I'm no Java fanboi, but these are some the classical advantages of Java over other languages:

    • The compiled code is completely (well, almost) platform-independent, eliminating the need to port or even recompile code when moving between platforms. This can be especially handy for GUI's, as it gets around the problem of different windowing systems having their own mutually exclusive API's. Write and compile your interface once, and it can be run on any machine that has a JVM installed, whether it be Windows, Mac, XFree86, or whatever.
    • It's ALMOST as fast (and in many cases just as fast) as C code. Additionally, it compiles much faster than C, though C binaries make up for it with substantially shorter load times (Java has been improving in this regard recently, however).
    • The language is designed to avoid some of the "problems" in C and C++.
    • Java provides free (in terms of effort) garbage collection, which (usually) prevents memory leaks.
    • Java applets can run in web browser. This allows websites to provide visitors to their sites with custom mini-applications to provide various functionality or visual effects. One of the major benefits to this (especially when combined with the use of application servers) is that a large organization can install all their software in a central place and allow its users to access it from any machine just by using their web browsers.

    There are others, but these are the ones that immediately come to mind for me.

    I'm a C++ coder myself, but I do appreciate Java's value for certain situations.

    --

    cp /dev/zero ~/signature.txt

  9. Re:JAVA - the little train that could by hanshotfirst · · Score: 4, Interesting

    And how long did it take BASIC to get this?
    When is it coming out for FORTRAN and COBOL?
    10 years is still young as far as languages go.

    --
    Why, oh why, didn't I take the Blue Pill?
  10. Re:Additional items by SnprBoB86 · · Score: 4, Informative

    You can allocate as much memory as you like using the right java command line flags:

    http://developer.apple.com/documentation/Java/Re fe rence/Java14VMOptions/VM_Options/chapter_1_section _4.html

    --
    http://brandonbloom.name
  11. Re:Sun actually listening to developers-java.net by AKAImBatman · · Score: 4, Informative

    java.com is the user's site that plays up stupid mobile games and the like.

    java.net is the "Network of developers" who are creating useful (and useless) software.

  12. 64-bit support is done! by Wesley+Felter · · Score: 4, Informative

    64-bit Java VMs have been available for SPARC64, PPC64, and AMD64 for ages.

  13. Re:SWT by mark-t · · Score: 4, Insightful
    If you didn't RTA, you may not have noticed that the *FIRST* thing on their list of improvements was improving the native look and feel for both the windows and gtk platforms.

    Also, Swing integrates well into the rest of Java, including Java2D, where SWT does not.

  14. From the article... by kjeldor · · Score: 5, Funny

    Where possible, we will add pointers

    Wow, the beginning of that sentence sure scared the hell out of me. In my opinion, asterisks should be for multiplication only.

  15. Re:64-bit pointers by AKAImBatman · · Score: 4, Informative

    Exactly. So why is Sun dragging its feet on porting its virtual machine for the Java language to the AMD64 platform?

    What are you talking about?!? Go to http://java.sun.com and click on "J2SE 5.0". Then click on "JDK 5.0 Update 2" and accept the license agreement. Right there are four packages for AMD64. (Two for Linux, two for Solaris.)

    Stop spreading FUD.

  16. Re:Java Desktop by DarkSkiesAhead · · Score: 5, Insightful


    Simple really-- some programmers are lazy. They can't be bothered with optimizing their code for individual platforms ... as soon as I find out something's written in Java I can immediately ignore it

    Sorry, but that's a pretty ignorant attitude. Judging an application soley on being java-based is a poor method. Rather, you should ask if the developing language is appropriate for the task. If someone told me they wrote a graphically intense FPS in java I would be suspicious. But, if the app only needs to be light and portable java may be a good choice. It allows for very easy control of how the application looks on multiple operating systems. A good example of a nice-looking java app with no speed issues is Limewire. It runs quickly, works well and can be updated more efficiently than if they had used a graphical toolkit for python or C. Not that anything is wrong with chosing python or C either. It entirely depends on your application requirements and development resources. Brushing off all apps written for the JVM (or any development kit) will cause you to miss out on a good app sometime.

  17. Re:Additional items by iwadasn · · Score: 4, Insightful


    It does, on linux and Solaris, I believe. No 64 bits on windows, perhaps because windows doesn't support it?

  18. As someone who develops Java desktop apps... by ChiralSoftware · · Score: 4, Insightful
    I would like to see three things:

    First, it seems like KDE/Qt has more momentum than GTK on the desktop. Qt apps look better and are more integrated with eachother. Suse is the dominant desktop Linux distro and Suse is KDE-oriented. I'm glad that Java is going to be using native GTK for rendering, but what I would really like to see is native Qt. Maybe they could create some kind of interface to make it easier to plug in different rendering systems? Maybe they could open source Java and let the community take care of it? Maybe they don't care because desktop Linux is only about 5% of the market anyway? But still, it's something I would like to see.

    The second thing they need is a "SwingLite", or some easier way to do common things. For example, it is very common to need a text field that allows the user to enter a number, but not text. Should be easy, right? This is the code I have to use to do it:

    formattedTextField.setFormatterFactory(new DefaultFormatterFactory(new NumberFormatter(NumberFormat.getIntegerInstance()) ));
    That's just wrong. I should be able to say:
    formattedTextField.setFormat("d+");
    or maybe:
    formattedTextField.setFormat(FormattedTextField.IN TEGER_ONLY);
    The above example, involving two different factory classes to just get the field to accept integers only, puts a high burden of knowledge on the programmer, and Swing is full of stuff like that. It's great that the power is there because I can write my own hierarchy of text formatting factories and objects that enforces correctly-entered Sandhi rules, but that doesn't come up very often, and what does come up very often is having to enter a plain old number, date, currency value, that kind of thing. And I'm just using this one example, but this kind of over-design is all over the place in Swing.

    The final problem that they have is putting emphasis on plugable look and feel. Application developers shouldn't get to decide the look and feel of their apps. That should be determined by the desktop environment. Pluggable look and feel is not a feature; it is a bug. It should be deprecated and removed.

    ----------
    Educational software

    1. Re:As someone who develops Java desktop apps... by aCapitalist · · Score: 4, Informative

      Despite the technical superiorty of Qt Sun will not use it to draw widgets because (A) Sun uses Gnome for its desktop and (B) the dual-licensing scheme of Qt.

      And I don't know where you get this information about KDE/Qt having more momentum. If anything, it's the other way around. Sun, RedHat, and Novell (the 3 biggest Linux shops) are all going with Gnome. Yeah, I know about Suse and KDE, but if you look at the resources being invested it's all Gnome/Mono.

      Until Trolltech gets bought out, the license issues surrounding Qt are unlikely to go away.

    2. Re:As someone who develops Java desktop apps... by Hulfs · · Score: 4, Informative
      What's wrong with doing:
      new JFormattedTextField(NumberFormat.getIntegerInstanc e());
      Seems to work fine for me. Uses the default locale's integer formatter. See Sun's Tutorial
  19. Seems like they are really improving things by FedeTXF · · Score: 4, Interesting

    I use many java desktop apps in my day to day tasks on my linux desktop. There is no better way to connect to multiple databases than Squirrel , No better way to code in Java than NetBeans and no better editor than JEdit

    I think Java 5 already has great desktop features like shared class data, and 2D acceleration for 2D acelerated hardware (which I don't have yet!).

  20. Re:Additional items by Decaff · · Score: 4, Informative

    I don't get it. If sun was responsible for 64-bit computers being commonplace, how come Java doesn't support 64 bits?

    Who says it doesn't?

    Go to javasoft.com, and check the downloads. You can get Java for 64-bit Linux on AMD and 64-bit Solaris on Sparc and AMD.

  21. Re:Java Desktop by MemoryDragon · · Score: 3, Interesting

    Actually Sun is not throwing in the towel, Swing has done an interesting approach no other Widget set has done so far. They basically went the way, of rendering the widgets still in software, but the underlying graphics layer is hardware accelerated if possible and the rendering data for the skins is directly parsed from the underlying OS skinning engine if present.

    And Swing has gotten much faster that way. Swing has been already more than usable in 1.4 and I recently checked the latest 1.6/6.0 builds, and all I can say is wohaaa... The guy in 1.6 at least on Windows is very snappy. I have had running Firefox and SwingSet2 running side by side and SwingSet2 blew firefox away rendering speedwise.

  22. What I want by ToasterofDOOM · · Score: 3, Interesting

    Is stability, security, and more speed. OOo 2 beta is SLOW and most issues i have with it are Java related in some way.

    --
    I am Spartacus
  23. Re:how about by Call+Me+Black+Cloud · · Score: 3, Insightful


    "Dear China,

    I am inexperienced with the Chinese language. I am having difficulty learning it because I find it ridiculously complicated. Please simplify it.

    Signed,

    VolciMaster"

    As for the layout managers, you just need practice with them. My suggestion is to stick with BorderLayout, FlowLayout, and BoxLayout (with some widgets from the Box class). You can easily nest panels using those layout managers to get what you want, 99% of the time.

    Do you know what frustrates me about Windows development (using C++ Builder)? Absolute positioning. I place things where I want them, run the app, resize the window, and nothing moves! Only the window gets bigger. Once you get the hang of layout managers you'll see how easy they are to use and how much nicer your UIs will be.