New Desktop Features Of Next Java 283
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."
It's worth noting... (Score:5, Interesting)
Re:It's worth noting... (Score:2)
Sun actually listening to developers-java.net (Score:2)
Its a good mix of Sun developers and java users. I'm thinking of jumping back into java and been poking around that site to see what is new.
Its not all netbean either, Eclipse is giving good billing to.
The
Re:Sun actually listening to developers-java.net (Score:5, Informative)
java.net is the "Network of developers" who are creating useful (and useless) software.
The look and feel of Swing. (Score:3, Interesting)
Always when I use some Swing based applications I'm remembered that the times of ugly GUI's aren't over yet.
Re:The look and feel of Swing. (Score:4, Interesting)
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.
Re:The look and feel of Swing. (Score:5, Insightful)
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.
Re:The look and feel of Swing. (Score:2)
Care to elucidate? Why does Write Once Run Anywhere mean a GUI doesn't make sense? Are you referring to the major UI differences between MacOS and most others, like having the menus in the bar at the top of the screen? If you write your java apps properly, they completely conform with the MacOS UI conventions when run on a mac. If you don't write them properly or don't care, then they'll be awful on a mac even if they have jellybean buttons.
Have a look at a larg
Re:The look and feel of Swing. (Score:2)
Well mostly because of user expectations based on the OS's gui conventions.
For example Windows uses a File menu that always appears first and contains saive, load, and exit. Settings appear usually in the second menu called "Edit"
Now on MyImaginaryOS I have the convention that the first menu is called "System". It contains program settings and exit the program. The second menu is called "Data". It contains the save, load, export to different format (which is not part of the save dialogue on my imaginary
Re:The look and feel of Swing. (Score:2, Insightful)
You can use the MacMetrics [oreilly.com] Metal theme I wrote to get an approximation of how things will be laid out under the MacL&F
alright.... (Score:3, Funny)
SubPixel Rendering (Score:5, Interesting)
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
Re:SubPixel Rendering (Score:2)
label.setFont(new Font("dialog",Font.PLAIN,12));
Obviously doesn't look as pretty as a regular anti-aliased font, but infinitely better than that disgusting bold font that is used by default.
Re:SubPixel Rendering (Score:4, Interesting)
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.
Re:SubPixel Rendering (Score:3, Interesting)
Disclaimer on the url "we would LIKE to" have in.. (Score:3, Interesting)
Not quite the same thing as "this is in the next version."
From the article... (Score:5, Funny)
Wow, the beginning of that sentence sure scared the hell out of me. In my opinion, asterisks should be for multiplication only.
Java & Longhorn (Score:2, Insightful)
Anyone knows what going on with this issue?
Re:Java & Longhorn (Score:2)
Re:Java & Longhorn (Score:2)
As someone who develops Java desktop apps... (Score:5, Insightful)
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:
That's just wrong. I should be able to say: or maybe: 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 [wikipedia.org], 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 [chiralsoftware.net]
Re:As someone who develops Java desktop apps... (Score:2, Informative)
No, it's not. Have you heard of "Novell Linux Desktop", the product that is intended to replace SuSE on the desktop? It's GNOME based, which is understandable because Novell also purchased Ximian.
RHEL and Fedora are also GNOME-focused, as is Ubuntu.
"Qt apps look better and are more integrated with eachother."
According to whom? I personally love the look and feel of GTK+, and I don't think that there's any problem with integration.
"The
Re:As someone who develops Java desktop apps... (Score:5, Informative)
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.
Re:As someone who develops Java desktop apps... (Score:4, Informative)
Seems like they are really improving things (Score:5, 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 [sourceforge.net], No better way to code in Java than NetBeans [netbeans.org] and no better editor than JEdit [sf.net]
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!).
I'd grind up netbeans (Score:3, Insightful)
Re:I'd grind up netbeans (Score:2)
Re:Seems like they are really improving things (Score:2)
Re:Seems like they are really improving things (Score:2)
Personally, I find using Emacs typing only with my nose and having the monitor switched off a better way to code in Java than using Eclipse - but I seem to be in a minority.
IntelliJ IDEA, both hands and a well adjusted LCD display are even better.
What I want (Score:3, Interesting)
Viva Java! (Score:2, Insightful)
I knock my pipes out writing SwingWT... (Score:5, Interesting)
...and nobody bloody cares or remembers.
SwingWT is a FREE implementation of the Swing APIs on top of SWT so you get all the juicy nativeness of SWT and all of the nice APIness of Swing. [sf.net]
Dear jFirstPostBot (Score:5, Funny)
You would have succeeded, if only you had used the speedy next version of Java, codenamed Mustang [internetnews.com].
Letter
What I'd like to see is (Score:5, Funny)
A story about desktops carry no weight with me unless there is pretty pictures.
Re:What I'd like to see is (Score:2)
Re:Additional items (Score:3, Interesting)
Re:Additional items (Score:5, Insightful)
It does, on linux and Solaris, I believe. No 64 bits on windows, perhaps because windows doesn't support it?
Re:Additional items (Score:2)
It does. 64 bit support already exists on Sparc. My guess is that this is for full 64 bit memory support on newer platforms.
Re:Additional items (Score:2)
A more pertinent question would be "Why aren't there any 64 bit JVM implementations?".
I don't know if any are available yet, but several are in the works.
Re:Additional items (Score:2)
I run 64 bit Java on my UltraSparc. I think that's the only 64 bit system that currently has 64 bit memory support. Mustang probably introduces 64 bit memory for the Opertron and the Itanic.
Re:Additional items (Score:5, Informative)
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.
Re:Additional items (Score:2, Informative)
Re:Additional items (Score:5, Informative)
http://developer.apple.com/documentation/Java/R
Re:Additional items (Score:2)
Re:Additional items (Score:2, Informative)
This is a JVM issue, not a language issue. There is nothing in the language spec limiting memory support to 2GB anymore than Windows C language programs are limited to 2GB of memory.
There is no real reason why Sun (or any other JVM provider) couldn't and doesn't provide a 64 bit JVM that can access more than 4GB of memory.
Having said that, it would be nice if there was a command
Re:Additional items (Score:2, Informative)
Try this on a 16 gigs of memory Solaris 10K:
byte[] b = new byte[3000L * 1000L * 1000L];
Seen this question today:
http://groups.google.com.br/groups?hl=pt-BR&lr=&t h readm=pan.2005.04.21.09.43.29.859952%40fffffffffff fff.com&rnum=11&prev=/groups%3Fq%3Dmemory%2B2005%2 6hl%3Dpt-BR%26lr%3D%26group%3Dcomp.lang.java.progr ammer%26start%3D10%26sa%3DN
People doing biometrics apparently are trying to.
iksra
Re:Additional items (Score:2, Informative)
Java already has support for 64-bit Athlon on Linux.
They also have a release candidate for Windows 64 here:
http://java.sun.com/j2se/1.5.0/download.js
Both of these versions allow the allocation of much more memory to Java apps. The old roughly 2 gig limit was a limitation of 32-bit operating systems, not of the java vm. Give it a shot on the 64-bit VMs with
java -Xmx3000m MyApplication
it should run fine (assuming you have >=3 gig of memory).
64-bit support is done! (Score:5, Informative)
Re:Additional items (Score:3, Informative)
1) In the current Sun JVM you can allocate more memory space with the -Xms and -Xmx switches (min and max heap size, respectively)
2) I believe that the Solaris VM has 64-bit support. 64-bit support for AMD/G5 could be forthcoming, but they are still relatively new. Than, and you can't really expect Sun develop optimized JVMs for competitors.
3) As for hardware specific calls and optimizations, I'm sure that if AMD,
Re:Additional items (Score:2)
Here's what I would like to see:
1) More obfuscated product naming conventions. Java2 1.6 6.0 Mustang?? C'Mon, that must have been agnominated by first-graders. I propose something like Java(2)1:6.0/Desktop-Revision 19.2 Supplement 12 Equus caballus
Re:Additional items (Score:2, Funny)
Re:Additional items (Score:2)
Re:Additional items (Score:3)
Not true. Why would you think that?
You'd have to stick with 32-bit integers, or you wouldn't get the same behaviour on two different platforms.
You don't know about "long"?
I guess the VM could use 64-bit pointers internally, but as you can't access memory directly in Java I don't know how the programmer would ever be able to tell.
The programmer would be able to tell when the allocation of more than 4 GB worth of objects happened withou
Re:Additional items (Score:2)
One of the most important of these goals was to retain a high degree of compatibility with C. This was done not only for purposes of code reuse, but to retain C's ability to handle system programming tasks.
Java is a useful language, but can't replace C++ for everything.
Re:64-bit pointers (Score:5, Informative)
What are you talking about?!? Go to http://java.sun.com [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.
No plug-in on AMD64 (Score:2, Informative)
Re:64-bit pointers (Score:2)
Sadly, there is no 1.4 version, which is the one i need/want. Only for the dead IA64 platform
Re:Java Desktop (Score:4, Insightful)
And second, they're addressing a significant issue with Swing which is its pokyness. This is going head on with SWT [eclipse.org], 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..
Re:Java Desktop (Score:4, Interesting)
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.
Re:Java Desktop (Score:5, Informative)
I'm no Java fanboi, but these are some the classical advantages of Java over other languages:
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.
Re:Java Desktop (Score:2)
On the other hand, while text mode apps can run on many platforms
Re:Java Desktop (Score:5, Insightful)
Simple really-- some programmers are lazy. They can't be bothered with optimizing their code for individual platforms
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.
Re:Java Desktop (Score:2)
2. The Java programmers of this planet would like to thank you for becoming one of their users.
Re:Java Desktop (Score:2)
Because you'll end up coding 10 times anyway, at least according to John Carmack. [armadilloaerospace.com]
But then again, what the hell does he know, right?
Re:Java Desktop (Score:2)
Re:Java Desktop (Score:2)
Re:Java Desktop (Score:2)
Why would I pay a programmer $1 an hour to code something for 10 hours on three different platforms, when I can pay him $1 an hour to code something once? Especially if I'm going to sell just as many copies for the same exact price in either scenerio -- the java route increases my return.
Exactly. But now think like a customer. Why would you buy a Mac and not a PC if you just wanted to run generic programs? Aren't you interested in looking for those programs out there that take specific advantage of your
Re:Java Desktop (Score:2)
From what I hear Azureus is about as fast as any C++ BT client but it adds a good UI and a lot more features than the av BT client.
As to dbvis I have been using it for a while at work and the free vertion works great. Now you want to show me a free / cheep C++ app that does the same things on OS X I will look into it untill then I am going to
Re:Java Desktop (Score:2)
In many ways, Linux takes better advantage of x86 architecture than Windows does. Linux is written multi-platform in the way I'm arguing makes sense, not by emulating a virtual machine on every platform, but by optionally taking advantage of the specialties of every platform. Otherwise, all Linux installations would be compiled strictly for the 386. And the ways that Linux comes up short on the x86 platform, it's due to either lack of hardware drivers which is a short-term problem (hopefully) OR the over
Re:Security (Score:2)
I don't play games on the web-- when I play games I play ones specifically designed to run on the hardware I have-- because the resultant experience is far better.
Years ago I bought an Atari 800. There were games available ONLY for the Atari 800, and some that were available both for the Atari 800 and the Apple II. Guess which ones were better on the Atari 800? The ones specifically designed for the platform, where the authors could take advantage of all the special features that only the Atari had.
Sup
Re:Java Desktop (Score:2)
You have never written a large multi-platform piece of software, have you? Learn to code something a bit more complex than Hello World before you call other people slackers for not going through the hell that is making a piece of software written in C/C++ work on multiple platforms, all from the same source.
No, in fact, I have been doing multi-platform development for around 20 years now, including client server, three tier, networked database and web applications. How much hell the programmers go thro
Re:Java Desktop (Score:2)
Making a project take much longer to implement and take literally twice as long to test really isn't a sensible option when you are paying people by the hour.
Java is not the panacea your argument here is claiming it is. Testing may take a bit longer, but that's not necessarily a bad thing-- some things get tested better on one platform than another and you find things you might not otherwise. And coding doesn't necessarily take much longer to implement if you are familiar with the variations in the tar
Re:how about (Score:2)
However, the more common GridLayout, BorderLayout and FlowLayout can all be used to make perfectly acceptable GUIs, it just takes a bit of practice. The main advantage with it is that it allows your windows to be a range of different sizes without repositioning anything, and is less likely to screw up when you change look and feel.
GTK has very similar layouts to Java as well.
Re:how about (Score:2)
For example, is there any way to have a double-height cell at the end of a row, and start on the next (single) row, and not have to resort to statically numbering everything?
BoxLayout is good for simple stuff but not when you need to have things line up both horizontally and vertically.
Re:how about (Score:2)
To my suprise and delight, it was incredibly easy to do... and I've done many custom layout managers since. They are about the same level of difficulty as some of the one-off scripts unix sysadmins might develop to automate a particular job that needs doing.
Re:how about (Score:2, Informative)
Localizability (Score:2, Insightful)
but I like to position the elements where I want them, and not how some layout manager feeld they will will go best.
Thing is that "some layout manager" will know about the different conventions used for different human languages when it comes time to localize your software. Pixel layout is dead because different languages use different numbers of letters to spell the same thing. And in Israel and the Arab world, text in the local languages reads from right to left.
Re:how about (Score:4, 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.
Re:JAVA - the little train that could (Score:4, Interesting)
When is it coming out for FORTRAN and COBOL?
10 years is still young as far as languages go.
Re:JAVA - the little train that could (Score:2)
Re:SWT (Score:5, Insightful)
Also, Swing integrates well into the rest of Java, including Java2D, where SWT does not.
Re:SWT (Score:3, 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.
But how close is it to the native Windows look? I've found that whenever someone does custom widgets that tries to emulate the native look, there's always something missing or slightly different that produces a disconcerting GUI feeling. Maybe a lot of people don't notice, but I'd rather it look completely different than almost the
Re:SWT (Score:2)
What about Firefox? With the Qute theme, it's pretty damn hard to tell that it's not a native app.
Re:SWT (Score:3)
Firefox is a native app.
Re:SWT (Score:2, Informative)
Re:SWT (Score:2)
And if you'd rather it look completely different so that it doesn't bug you, that's what the "Metal" L&F is for.
Re:SWT (Score:2)
(I've never managed to find it.)
Re:SWT (Score:2)
Wow, interesting? This is a troll. Swing already uses hardware acceleration, and you can't really tell the difference on most apps (in my experience) between swing and SWT.
Yeah, SWT, it's like swing but without all that pesky portability and inherent safety. That's exactly what java needs, I demand more buffer overflows.
Re:AWT? (Score:2)
Here's some info [javaworld.com].
Re:Whats the point now (Score:2, Informative)
Re:Whats the point now (Score:2)
-Mark
Re:Whats the point now (Score:2)
It can be done, and it is done by those doing Swing work effectively. With tools like JFormDesigner, you can just create resources that are loaded in real time by your swing app. Add a binding framework, and building GUIs in Java becomes as easy as making GUIs in pretty much any other language.
Re:Whats the point now (Score:2)
Re:Whats the point now (Score:2)
Re:Whats the point now (Score:2)
What are you talking about ? Two instances of a JSP don't share objects. They are both different instances of the jsp servlet class.
Re:Whats the point now (Score:2)
http://www.imagescript.com/atg/articles/jsp_j2e e
each web server thread calls on the _jspService method but the servlet behind the JSP page is made only once. If you add your own functions and variables outside of the scope of the _jspService method all that stuff seems to get shared between threads running on your web server.
Re:Whats the point now (Score:2)
Good luck getting
Re:Whats the point now (Score:2)
That is one suggestion which needs to be sent to the team working on the new Java. This would make things sensible. It would be even better if they used an XML syntax similar to Mozilla's XUL or even the stuff WxWidgets uses - this would (hopefully) make porting a breeze.
Re:Sounds great...couple more things... (Score:3, Interesting)
Why? I'm genuinely curious here - I also use WebStart, and I don't need to end up with two versions of the code. Be interested to hear what's restricting you.
Cheers,
Ian
Re:Native Swing rendering - oxymoron? (Score:2)