Mac Widgets for Java – 0.9.2
September 29, 2008
I’ve just released Mac Widgets for Java version 0.9.2. I’ve added a Heads Up Display (HUD) component and factored out the UI delegate from SourceList so that you can make any JTree look like a Source List. You’ll find the full list of enhancements and fixes here.
Advertisement
October 5, 2008 at 3:15 am
Nice work Ken, looks great. Between MacWidgets and Quaqua it seems like you can get pretty close to native. Are you using this in any production apps?
October 5, 2008 at 11:31 am
Hi Zachary,
I’m not using this library in any production apps (yet). I do know that Poker Copilot is using it, though I don’t know if the latest screen shots reflect this.
-Ken
October 6, 2008 at 4:37 pm
[…] Orr has announced release 0.9.2 of the Mac Widgets for Java library. Two biggest additions in this release are Heads […]
October 16, 2008 at 2:54 pm
Nice job!
I’ve tried this on my macbookPro => very nice..
But on vista, there is no transparency ..
Do you have an idea why ?
Bruno.
October 16, 2008 at 6:21 pm
Hi Bruno,
There currently isn’t a way to make transparent windows across platforms only using the Java APIs. There are open source projects that make this possible, but I’m trying to reduce Mac Widgets for Java’s dependencies.
Check out the JNA project for more information on creating transparent shaped windows on other platforms. You may be able to use this library in conjunction with Mac Widgets for Java.
-Ken
October 17, 2008 at 12:26 pm
Its going to be used in the next version of jaikoz
One thing that would be great would be iTunes style dark blue scrollbars to go with the iTunes table stuff you did.
October 17, 2008 at 12:32 pm
It’s on the way! Mac Widgets for Java 0.9.3 will have an iTunes style table (a somewhat refactored version of what’s there now) and an iTunes style scroll pane.
-Ken
October 29, 2008 at 11:27 am
One possible issue Ive had with the Unified Toolbar, is my custom icons appear to be to be floating, and seem too spaced out. Am I doing something wrong, or is this how its meant to be.
October 29, 2008 at 11:32 am
Hi ijabz,
Are you using the latest version of Java on the Mac (version 1.5.0_16, a.ka. Update 2)? If so, I know there are some margin issues which I haven’t yet addressed (I’m still using update 1).
Can you email me a screen shot ( kenneth.orr@gmail.com )?
-Ken
October 29, 2008 at 1:36 pm
Hi Ken
Yes Im using 1.5.0_16, there is a screenshot on my blog just click on my link and double click on the image
May 4, 2009 at 8:43 pm
I followed Ken’s idea and added the following code in the HudWindow class to get the shapped windows working on Windows:
fDialog.addComponentListener(new ComponentAdapter() {
public void componentResized(ComponentEvent evt) {
Container pane = fDialog.getContentPane();
Area area = new Area(new Area(new RoundRectangle2D.Double(
0, 0, pane.getWidth(), pane.getHeight(), ROUNDED_RECT_DIAMETER, ROUNDED_RECT_DIAMETER)));
com.sun.jna.examples.WindowUtils.setWindowMask(fDialog, area);
}
});
I had to do a bunch of other changes to get com.sun.jna.examples.WindowUtils on the classpath but it works.
I think you should be able to do the following to get transparency:
if (com.sun.jna.examples.WindowUtils.isWindowAlphaSupported()) {
com.sun.jna.examples.WindowUtils.setWindowAlpha(fDialog, 0.0f);
}
But I couldn’t get it to work. I assume because I’m using windows XP at the moment. Maybe it would work in Vista.
May 4, 2009 at 11:05 pm
Thanks for the update Cal. I’m curious to see this solution through — I’d like to incorporate this ability into Mac Widgets for Java. I wonder why it’s not working for your on Windows XP? What JDK are you using?
-Ken