I created this basic Java desktop infrastructure with Arabic display texts in about 15 minutes, though the RTL parts took a bit longer to get exactly right in the end, but were solved thanks to two sources discussed further down in this blog entry:
Notice that the application has a window system with undockable components, as well as a menu bar and a toolbar; all of which are pluggable because this is an example of a NetBeans Platform application, which is natively modular. Now "all" you need to do is code your business logic and you're done, since the infrastructure is ready and waiting for your domain-specific content. Consider the above as a generic template for Arabic Java desktop applications, i.e., the above application can run on Windows, Linux, Mac OSX, etc, i.e., on any operating system that supports Java SE.
Want to create the application you see above? Below are 5 tips to help you get started.
Click Next, choose your distribution, and then click Download. You will see Arabic in the page that appears as the download starts:
Two concerns could come to the front of your mind at this point, neither of which are genuinely problems. First of all, you'll be concerned about, at the end of your application development, needing to bundle only the Arabic JARs, and not all the other ones, with your application. This blog entry, with thanks to Johan Walter, a Swedish NetBeans Platform developer, should help you out on that score. Secondly, once you've started up NetBeans IDE in Arabic (using the next step below), you might be concerned when you notice that not everything has been translated into Arabic, for example:
But, you shouldn't be concerned about this either. Remember that the point of this exercise is to create your own Arabic application on the NetBeans Platform. As you'll see later in this blog entry, you have full control over all the texts in the NetBeans Platform, so you can change any text, throughout the NetBeans Platform, to Arabic. Therefore, the fact that NetBeans IDE itself, or even the NetBeans Platform itself, is not fully translated to Arabic really isn't a blocker to creating applications in Arabic on top of the NetBeans Platform.
However, as noted earlier, the fact that you're creating an application in Arabic doesn't mean that the IDE itself must be set up in Arabic. You could create an Arabic application in the English NetBeans IDE, which might be the simplest way to do it. Once you've started up the IDE and you've created your new NetBeans Platform application, which is as always done via the New Project wizard, set the following in the platform.properties file of the application, so that the Arabic JARs are used for the application that you're creating:
Predefined NetBeans Platform display texts need to be translated to Arabic. Not a problem. Let's imagine you want to translate the "Window" menu to "شباك", for example. Right-click the application and choose Branding. In the Branding dialog, go to Resource Bundles, type the text you want to change, and then you'll need to read through the filtered strings intelligently to identify the one you need to change:
Then right-click on the string you need to translate and choose Add to Branding. Then type your Arabic characters, which will then be saved in the application's 'branding' folder, in a properties file, where the entry will override the one provided by the NetBeans Platform itself.
However, note that the IDE from which you run this application MUST include the Arabic JARs, i.e., you need to not only have NetBeans IDE 7.2, but the Arabic version of NetBeans IDE 7.2, as described in the first tip above. Note that the RTL support (i.e., the right-aligned menubar, toolbar, and tabs) is not part of the above download. Instead, refer to the sources mentioned in the previous tip if you're interested in those pieces.
Hope this is helpful to Java desktop developers wanting to create their software systems for Arabic end users. Using all the tools, components, and coding patterns provided by the NetBeans Platform is surely a lot simpler than reinventing the wheel all by yourself.
Funny Moment of the Day. Frank Caliendo is pretty clever with his impersonations, check this out on YouTube.