I need a little help. Since getting my first tablet at the end of last summer I've been bummed that the floating TIP doesn't work in Java swing apps. Why? For one I use a number of Java apps that use the Swing windowing toolkit, but I'm also a developer of some of these apps.
Whats the problem? Well Swing does not use "native" UI controls. It renders all of it's controls on it's own. On Windows XP TE, text controls in Swing aren't recognized as Windows text controls. So you don't get the little floating button that allows you to open the floating TIP. This means that you have to resort to using the bottom-of-the-screen TIP which sacrifices screen realestate, sometimes forces apps to resize without restoring their original sizes when it's closed. Basically it's a hassle to use these apps in this way.
I was finally inspired to start working on a fix for this issue since Sun has been a no show in providing good Windows tablet support in Swing. I think I'm onto a solution and want to get some feedback as to whether it works for others running XP and even Vista on their UMPCs and other tablet PCs.
I put an early test application here:
http://www.eeaston.com/tabletpc/2007-04-09/SwingOnTablet.jarIt's an executable jar that should run by double clicking if you have a Java 1.2 or newer Sun JVM installed on your Windows box or by executing
java -jar PATH\TO\SwingOnTablet.jar
specifying the appropriate path to the jar file.
Assuming you are running on a tablet with an active digitizer or have UMPC running floatip.exe, all it does is open a window with three text fields:
- a native text field that should offer the floating TIP button as expected
- a regular Swing text field that doesn't (i.e. is broken)
- a fixed Swing text field that offers the TIP button (but no right click copy/cut/paste menu yet)
If you decide to help me test it, please report if it works or not as well as the OS and Java versions it reports (or a screen shot).
My initial goal is to allow a Java developer using Swing to explicitly tablet-enable their app on Windows Tablet systems. Then at some later point find a way to enable tablet support for all Swing apps.
BTW, even though Java is oriented at being cross platform, this is meant for
Windows tablet systems. It might run on non-Sun non-Windows JVM as implemented, but will probably act erratically until I rig it to only add the special processing on Windows tablets. So if you are running on a Mac, a Linux system, or something other than a Windows tablet, please don't bother experimenting with it. It'd be sort of pointless.
Thanks in advanced for anyone who offers their testing help.