Česky   |  Deutsch   |  English   |  Español   |  Français   |  Indonesia   |  日本語   |  한글   |  Polski   |  Português (BR)   |  Türkçe   |  中文   |  正體中文   |  Your Language  
PlanetNetbeans
Planet NetBeans is an aggregation of NetBeans related musings from all over the Blogosphere.
Feeds
[RSS 1.0 Feed] [RSS 2.0 Feed]
[FOAF Subscriptions] [OPML Subscriptions]
Do you blog about NetBeans ? Add your blog to PlanetNetBeans.
Feed Subscriptions
NetBeans Zone - The social network for developers (feed)
APIDesign - Blogs (feed)
Pandaconstantin (feed)
blogtrader - Blog (feed)
J. O'Conner » NetBeans (feed)
David R. Heffelfinger (feed)
Carsten Zerbst's Weblog (feed)
Winston Prakash's Weblog (feed)
markiewb's blog (feed)
Gualtiero Testa » Netbeans (feed)
James Selvakumar's Blog » netbeans (feed)
nB gUru » NetBeans (feed)
Newsintegrator Blog » netbeans (feed)
Praxis LIVE » NetBeans (feed)
ProNetBeans (feed)
TechAshram » NetBeans (feed)
There's no place like 127.0.0.1 » Netbeans (feed)
Paulo Canedo » NetBeans English (feed)
Anchialas' Java Blog (feed)
Need to find a title (feed)
Category: NetBeans | Software and Science (feed)
Roger Searjeant's blog (feed)
Optonline Webmail (feed)
Michael's blog » NetBeans (feed)
Allan Lykke Christensen » NetBeans (feed)
Inspiration and Expression » Netbeans (feed)
Adam Bien (feed)
Ignacio Sánchez Ginés » NetBeans (feed)
Michel Graciano's Weblog (feed)
Ramon.Ramos (feed)
Ozone and Programming » netbeans (feed)
NetBeans Ruminations » NetBeans (feed)
Tiplite » netbeans (feed)
Bistro! 2.0 (feed)
Arun Gupta, Miles to go ... (feed)
Geertjan's Blog (feed)
.JARa's Bilingual Weblog (feed)
JavaFX Composer (feed)
The Java Jungle (feed)
Jesse Glick (feed)
Martin Grebac (feed)
The NetBeans Community Podcast (feed)
NetBeans Profiler (feed)
NetBeans for PHP (feed)
NetBeans Web Client (feed)
Rechtacek's (feed)
Virtual Steve (feed)
My First Blog - Satyajit Tripathi (feed)
The Aquarium (feed)
Tinuola Awopetu (feed)
Insert Witty Irony Here (feed)
mkleint (feed)
Anuradha (feed)
Netbeans6/6.5 my best practices (feed)
Java Evangelist John Yeary's Blog (feed)
Neil's Dev Stuff (feed)
Computer says null; (feed)
NetBeans Adventures, Java and more (feed)
NetBeans Community Docs Blog (feed)
The Netbeans Experience (feed)
NbPython/ jpydbg / pymvs (feed)
Shanbag's Blog (ರಜತ ಲೋಕ) (feed)
Wade Chandler's Programming Blog (feed)
Big Al's Blog (feed)
Code Snakes (feed)
In perfect (spherical) shape (feed)
Manikantan's Netbeans (feed)
Van Couvering Is Not a Verb (feed)
Diego Torres Milano's blog (feed)
Vroom Framework (feed)
Messages from mrhaki (feed)
Jeff's Blog (feed)
Oliver Wahlen's Blog (feed)
Shuttle between Galaxies (feed)
Welcome to my live... (feed)
Netbeans IDE Blog by Tushar Joshi, Nagpur (feed)
Devel Blog (feed)
diamond-powder (feed)
Antonio's blog (feed)
Where's my Blog?!

Powered by:    Planet

Last updated:
July 23, 2014 06:32 AM
All times are UTC

Sponsored by
sponsored by Oracle

visit NetBeans website
NetBeans Zone - The social network for developers - July 22, 2014 01:16 PM
NetBeans Weekly News (Issue #649 - July 22, 2014)

Project News Centigrade: New NetBeans Partner Centigrade, with its NetBeans BizLaf plugin, is the latest addition to the NetBeans Partners page. Does your company also add value to NetBeans IDE? Let us know at netbeans dot webmaster at gmail dot com! Preview Text:  In this issue: Centigrade joins the NetBeans Partner Program; Monet, a new plugin...

NetBeans Zone - The social network for developers - July 22, 2014 08:02 AM
Joachim Arrasz: My Five Favorite NetBeans IDE Features!

Following on from Ciprian Turcu, 

NetBeans Zone - The social network for developers - July 21, 2014 10:10 AM
NetBeans in the Classroom: Mandatory Methods for Beans (Part 3)

Ken Fogel is the Program Coordinator and Chairperson of the Computer Science Technology program at Dawson College in Montreal, Canada. He is also a Program Consultant to and part-time instructor in the Computer Institute of Concordia University's School of Extended Learning. Preview Text:  Regular NetBeans education columnist Ken Fogel, the Program...

markiewb's blog - July 20, 2014 02:45 PM
NetBeans: Fix Maven dependency issues in the graphical pom.xml view

Recently I noticed that the pom.xml view in NetBeans not only shows you conflicting dependencies but it also provide fixes within this view.

Click on the light bulb (you know it from the quickfixes/hints in the Java Editor) and a conflict resolving dialog will open. Nice to know

2014-07-20_16h37_09


NetBeans Zone - The social network for developers - July 18, 2014 12:17 PM
NetBeans Podcast 70 - Community Satisfaction

Podcast Guests: Ashwin Rao (NetBeans-Oracle), Ken Fogel (Dawson College, Montreal) Download mp3: 31 minutes – 26 mb Subscribe on iTunes Preview Text:  Senior Group Manager for NetBeans Product Management Ashwin Rao discusses how NetBeans satisfaction surveys benefit the community. Ken Fogel, creator of the popular "NetBeans in the...

Geertjan's Blog - July 18, 2014 07:00 AM
French, Polish, Dutch Updated Translations of NetBeans Platform

Mixing existing translations from the community translation project with new supplemental translations, as described here, we now have NetBeans Platform translations updated to Polish, French, and Dutch during the last few days:

French, by Constantin Drabo:

Polish by Sławek Mikuła:

Dutch by me:

If you want these translations as the basis of your own work, let me know in the comments to this blog entry. We're collecting the translations at https://java.net/projects/localized-netbeans, which is currently only accessible if you're a member of the project. We'll open the site soon so anyone can access it.

Even the above are not complete translations yet, we're just focusing on the visible texts that we see as we look through the menus, dialogs, etc, of the NetBeans Platform. It's a slightly haphazard process but better than nothing. Translators who complete the 'platform' translation, then start working on the 'ide' translation, which is a separate application on top of 'platform', followed by 'javase', etc, etc, one step at a time, until all of the IDE is translated.

Adam Bien - July 17, 2014 07:43 AM
Nashorns, Strange Practices, DI in FX and No Hallway Conversations--An Interview About my (=Adam Bien) JavaOne Activities

In the interview I said: "The JavaOne is the only conference, which I attend as a speaker" what I meant was: "...as an attendee". Sorry, but it was late :-).

Thanks Reza https://twitter.com/reza_rahman for the interview!

See also other screencasts at: http://tv.adam-bien.com or subscribe to http://www.youtube.com/user/bienadam.

See you at Java EE Workshops at MUC Airport or on demand and in a location very near you: airhacks.io!


Real World Java EE Workshops [Airport Munich]>

APIDesign - Blogs - July 17, 2014 06:51 AM
Japanese Translation is Real

Cover of Japanese translation of TheAPIBook. I am amazed, the book is about 30% shorter, yet is seems to contain all the content of the original one!

Image:PracticalAPIDesignInJapanese.jpg

Great work Yoshiki!

--JaroslavTulach 06:51, 17 July 2014 (UTC)

NetBeans Zone - The social network for developers - July 17, 2014 05:15 AM
NetBeans 8 — Shortcut to Remote Platforms (Part 3): Remote Platform Debugging

I created a series of quick intros to the NetBeans 8 Remote Platform feature. This clip shows how to remotely deploy, execute and debug an JavaFX application on a Raspberry Pi with NetBeans 8. Preview Text:  This article and video is part of a series of quick intros to the NetBeans 8 Remote Platform feature. This clip shows how to remotely...

Praxis LIVE » NetBeans - July 16, 2014 06:03 PM
Praxis LIVE : new look, new direction

If you’ve been following the Twitter feed recently you may have noticed that Praxis LIVE has gained an all new look. However, the recent changes are far more than skin deep, with a radical rethink of many aspects of the … Continue reading

Geertjan's Blog - July 16, 2014 09:16 AM
NetBeans Translation Tip #1: Page Setup Dialog

No matter what you do, you're unable to translate the "Page Setup" dialog, which is accessed from "File | Page Setup..." in the main menu of the NetBeans Platform. 

The reason for the problem is that the strings that you see above do not come from the NetBeans Platform. Instead, they come from the JDK, specifically, from rt.jar, where you'll find the following:

The above screenshot shows which languages are supported for the Page Setup dialog. Therefore, if you switch locale to "pl" for Polish or "nl" for Dutch or some other language not listed above... the English texts will be shown and nothing you do with properties files in the 'branding' folder in your NetBeans Platform application is going to change that.

But there is a solution.

  1. Get the source. Go here, i.e., the source of sun.print.resources.serviceui, and copy that source file into the NetBeans module for your language. Change the name of the class to include your locale, e.g., "serviceui_nl_NL.java" and, to help yourself later to understand why it's there, put it into the same package structure as the other files in rt.jar.

  2. Translate the texts. Then translate all those texts, e.g., the key "radiobutton.portrait" currently has the value "Portrait". Translate that word "Portrait" and replace the value with your translated word. Do the same for all the values in the file, of which there are about 150, I guess.

  3. Install the translation. Then create this class in your language module:
    import java.lang.reflect.Field;
    import java.util.Locale;
    import java.util.ResourceBundle;
    import org.openide.windows.OnShowing;
    
    @OnShowing
    public class PageSetupTranslator implements Runnable {
    
        @Override
        public void run() {
            ResourceBundle bundle = 
                    ResourceBundle.getBundle(
                            "sun.print.resources.serviceui", 
                            new Locale("nl", "NL"));
            try {
                Class cl = Class.forName("sun.print.ServiceDialog");
                if (cl != null) {
                    Field fld = cl.getDeclaredField("messageRB");
                    if (fld != null) {
                        fld.setAccessible(true);
                        fld.set(cl, bundle);
                    }
                }
            } catch (ClassNotFoundException ex11) {
            } catch (NoSuchFieldException ex11) {
            } catch (SecurityException ex11) {
            } catch (IllegalArgumentException ex11) {
            } catch (IllegalAccessException ex11) {
            }
        }
    
    }
    Reference: https://community.oracle.com/thread/1287832

  4. Check the module structure. You should now see the following structure in your language module:


Now, when you start the application, your "serviceui" class will be picked up and applied to the Page Setup dialog. Of course, when there are multiple such classes, as will be the case in the "LocalizeNetBeans" project, there'll be a problem because multiple of these files will be applied to the Page Setup dialog. Just disable all of them by commenting the @OnShowing annotation for all of them except your own during development and in production the user will only be using one language anyway and, if they need more, they'll switch to a different locale, restart their application, and then the class applicable to the locale will be applied to the Page Setup dialog.

Adam Bien - July 16, 2014 07:23 AM
Late Summer Java (SE,FX,EE) Hacks

  1. Munich Airhacks: From Java EE to HTML 5, 21st to 25th July: http://workshops.adam-bien.com
  2. Virtual: 5th, 6th and 7th Airhacks Q & A (each first Monday of the month at 6 P.M. (CET): http://www.ustream.tv/channel/adambien Temporary questions repo: https://gist.github.com/AdamBien/e1855469d4c507427ef9
  3. Hamburg: "Java EE Patterns and Best Practices", 11th-13th August, http://www.oose.de/training/java-ee-6-patterns-und-best-practices/
  4. Rapperswil: Java EE 7 + Java 8 Good Practices, 9th September, http://www.ch-open.ch/wstage/workshop-tage/2014/programm-2014/ws-1-java-ee-7-java-8-good-practices/
  5. San Francisco: JavaOne, 28th September, 9th October, "Enterprise Nashorn", Productive Java FX 8, Unorthodox Enterprise Practices and Java EE 8 Community Update and Panel"
  6. Munich Airhacks: "Java 8 with Java EE 7 or The Impact of Java 8 on Java EE Applications" http://workshops.adam-bien.com/java8.htm

Enjoy the summer of Java!


Real World Java EE Workshops [Airport Munich]>

NetBeans Zone - The social network for developers - July 16, 2014 05:15 AM
NetBeans 8 — Shortcut to Remote Platforms (Part 2): JavaFX on Raspberry Pi

I created a series of quick intros to the NetBeans 8 Remote Platform feature. This clip shows how an JavaFX application is deployed on a Raspberry Pi and remotely executed from NetBeans. Preview Text:  Intro to the NetBeans 8 Remote Platform feature: How an JavaFX app is deployed on a Raspberry Pi and remotely executed from NetBeans. This...

NetBeans Zone - The social network for developers - July 15, 2014 11:44 PM
NetBeans Weekly News (Issue #648 - July 14, 2014)

Community NetBeans Community Podcast 70 In this Summer edition, meet Ken Fogel, creator of the popular "NetBeans in the Classroom" article series; find out how to get NetBeans web content in other languages; and discover how the biannual satisfaction surveys conducted by the NetBeans team benefit the community. Preview Text:  In this issue: The...

Geertjan's Blog - July 15, 2014 07:05 AM
Lightweight Process for Translating NetBeans IDE

To me, the problem with translating NetBeans IDE over the years has been that the process has always been very complicated with all kinds of tools that need to be set up.

Wouldn't it be cool if there was a simple, lightweight process. One that anyone can follow, in between doing other work, i.e., quickly dedicate half an hour every day to translating NetBeans IDE, whilst doing other work? No new tools to set up, no new and complex processes to learn? Everything done from within NetBeans IDE itself?

Here's how that can be achieved. Some steps have small YouTube clips to illustrate points made. These YouTube clips are silent, the idea is to watch and learn from the process.

  1. Get Set Up. Download and unzip the last community translation distribution, i.e., the one that contains more than the official translations, e.g., Russian, but the community translations, e.g., German and French. They're found here and I started with the netbeans-7.3-201302261559-javase.zip.

    Then get hold of the "Localized NetBeans" project. This is a project I have created on java.net and isn't public yet. That will happen soon. If you want to participate, let me know (leave a comment at the end of this blog entry with your java.net username included), I will add you as a member to the project, which will give you access to the project sources. The location is https://java.net/projects/localized-netbeans though, again, without being a member you will not be able to get to the project site.

  2. Set Up the Translation Module. As described in a recent blog entry, here, a NetBeans Platform application can provide modules with translated texts for UI elements in the application, which can be enabled via the --locale switch. Therefore, if it doesn't already exist, create a new module for your language in the "LocalizedNetBeans" project and move the JARs from step 1 that already provide translations into the module.

    Small overview for adding Korean:

    If you're doing a language for which no JARs already exist, just skip this step and go straight to the next one, i.e., for Serbian you'll start by writing down some texts that you want to translate, then look for them in the Branding dialog after selecting the Serbian locale, and have NetBeans IDE create properties files automatically for you. See the next step for the details.

  3. Start Translating. Any missing translations? Look around, identify what's missing, look for the texts in the Branding tool in NetBeans IDE, and add them.

    Small overview for translating to Korean:



    Remember, when searching for texts in the Branding tool, that if a text has an underline, e.g., "Options" with the "O" underlined (to create an accelerator key), you need to look for "&Options".

  4. Move to the Next Level. Once the "LocalizedNetBeans" has been translated, i.e., the lowest level of NetBeans IDE, which is the NetBeans Platform, move to the next level, which is already available, i.e., "LocalizedIDE". The focus here is on the "ide" cluster, e.g., the project system, and other tools that related to an IDE created on top of the NetBeans Platform.

    Small overview for moving from "platform" to "ide":

    "LocalizedIDE" depends on the cluster of "LocalizedNetBeans", so that those translations are automatically included.

    After the above is done, the next level would be "LocalizedJavaSENetBeans", where the focus is to provide the missing translations for your language in the community distribution for the Java SE distribution of NetBeans IDE, i.e., the Java Editor and related tools. "LocalizedJavaSENetBeans" will depend on the cluster of "LocalizedIDE".

  5. Check In. At the end of the previous steps, you'll possibly have one or more new modules, if your language wasn't supported yet, and you'll definitely at least have new properties files in the 'branding' folder of "LocalizedNetBeans", "LocalizedIDE", etc. Check those in. When there are enough of them, or when you say you're done, or at some stage when at least all the visible texts have been translated, I will put those properties files together into one or more new NetBeans modules. There'd be one module for the 'platform' translation of Korean, one for the 'ide' translation, etc, because not everyone will want all the translations, e.g., if you're creating an application on the NetBeans Platform, you don't want the Java Editor translations, so best to keep them separated per 'level'. Those various modules will be uploaded together to the NetBeans Plugin Portal. Anyone can download and install them and use the --locale switch to activate them. So we'll end up with language packs for each language, available on the Plugin Portal.

On the 'platform' level, i.e., the level of "LocalizedNetBeans", most things are already translated for most supported community languages. I.e., if you're using the NetBeans Platform, German and French and Spanish and Italian translations are mostly complete already, a few gaps here and there which won't take much work to add by a native speaker. And the above approach can also be used to add new modules, for Serbian, for example.

The process is simple and completely integrated into NetBeans IDE so that anyone can, in between programming, do a little bit of translation work.

Want to participate? Leave a comment that includes your java.net username so that you can be added to the project and so that you can start following the steps described above.

Adam Bien - July 15, 2014 05:00 AM
Starting With Java FX, Maven and afterburner.fx

Very first steps (minutes) with maven, igniter and afterburner:

See also other screencasts at: http://tv.adam-bien.com or subscribe to http://www.youtube.com/user/bienadam.

See you at Java EE Workshops at MUC Airport, particularly at the Java EE User Interfaces workshop!


Real World Java EE Workshops [Airport Munich]>

Java Evangelist John Yeary's Blog - July 15, 2014 12:46 AM
JSF 1.2: Project Woodstock Button Facet Table

I was going through some old code examples. I found one created with Sun Studio Creator. Yes, it was very old.

The original example was developed by Winston Prakash.

I did some updates to Project Woodstock from the original Project Rave, and came up with a pretty new example page.

The project can be downloaded here: ButtonHeaderTable

Note: You will need to use NetBeans 6.5.1, or 6.7.1 to run it.

Geertjan's Blog - July 14, 2014 03:24 PM
Monet: Tight JavaFX Scene Builder Integration in NetBeans IDE

With an appropriate sense of flair, Sven Reimers has published his JavaFX Scene Builder/NetBeans integration module under the name "Monet", i.e., in the same series of project names as "Matisse", the NetBeans Swing GUI Builder.

Get it here:

http://plugins.netbeans.org/plugin/55434/monet-the-javafx-scene-builder-integration

Small silent movie by me highlighting a subset of its features:

Be aware that I am using BizLaf, hence my IDE looks pretty different to the standard NetBeans IDE.

And note that Monet is far from done:

https://bitbucket.org/sreimers/nbscenebuilder

The NetBeans Community Podcast - July 14, 2014 12:31 PM
NetBeans Podcast 70

Podcast Guests: Ashwin Rao (NetBeans-Oracle), Ken Fogel (Dawson College, Montreal)

Download mp3: 31 minutes – 26 mb
Subscribe on iTunes


NetBeans Community News with Geertjan and Tinu

  • Take the NetBeans IDE 8.0 Satisfaction Survey! There's still time to tell the NetBeans team what you think about the release and what you'd like to see in future versions.
  • Would you like to have NetBeans documentation and web content be available in your local language? Then volunteer to be a translator for the NetBeans Community Localization project.
  • In our ongoing article series, find out what aspects of NetBeans IDE users from around the world think are really awesome: My Five Favorite NetBeans Features.
    •  Do you want to contribute to the series? Send a note to netbeans dot webmaster at gmail dot com


07:42 / Ashwin Rao - How Satisfied Are You with NetBeans?

Since NetBeans 7.0, the NetBeans team has sent out a satisfaction survey after each release to determine if it is meeting release objectives, innovating and improving the product, and addressing user concerns. Ashwin Rao, Senior Group Product Manager for the NetBeans Product Management team, shares how past survey responses have impacted the IDE and the community; he also discusses what the surveys reveal about NetBeans users and their expectations.

21:10 / Ken Fogel - Teaching Java Programming with NetBeans IDE

There are many reasons why NetBeans IDE is a great tool for teaching Java Programming; through his "NetBeans in the Classroom" article series on NetBeans Zone Ken Fogel, an educator in Canada, has been documenting all the reasons that he knows of. He joins the podcast to discuss his methodologies, why he prefers NetBeans, and plans to involve more people in the teaching community to grow awareness of NetBeans as a great tool for education.


*Have ideas for NetBeans Podcast topics? Send them to ">">">">nbpodcast at netbeans dot org.
*Subscribe to the official NetBeans page on Facebook! Check us out as well on Twitter, YouTube, and Google+.

Adam Bien - July 14, 2014 05:11 AM
Hosted WatchDock(er) Available

watchdock is also available from: http://watchdock.org

Watchdock is an offline docker monitoring and management (coming soon) HTML 5 app. watchdock will directly connect to your local docker installation without using any backend service.

I will also use watchdock as one of the examples during the regular airhacks.


Real World Java EE Workshops [Airport Munich]>

Java Evangelist John Yeary's Blog - July 13, 2014 08:50 PM
JSF 1.2: Visual Web Pack (Project Woodstock) Java Persistence API Example

Master-Detail Example
This is some example code that I have for a Visual Web Pack (VWP) project that demonstrates some complex data table examples.

I often fantasize about being able to get the band back together and make Woodstock 2.0. Here is an example of why. This was complex for JSF 1.2.

The code can be downloaded from: vwpjpaexamples

I would strongly recommend using NetBeans 6.5.1 to build and run the example project.

Geertjan's Blog - July 12, 2014 09:40 AM
How to Bundle Localized NetBeans Modules with Ant Based NetBeans Platform Applications (Part 2)

After learning the basics of bundling localized JARs in Ant based NetBeans Platform applications, yesterday, let's now provide support for a language that is not officially supported by NetBeans IDE, i.e., a language other than English, Brazilian Portuguese, Japanese, Russian, and Simplified Chinese. Timon Veenstra's team working on the AgroSense project have done us all a big service by creating the NetBeans Maven Libraries project on java.net. (How to integrate that into a Maven NetBeans Platform application is described here.)

We're going to go there and get the localized JARs we need. They're from NetBeans Platform 7.2, which isn't actually much of a problem because on the level of the NetBeans Platform, which is what most NetBeans Platform developers use (i.e., most developers build on the NetBeans Platform and not on the NetBeans IDE on top of it) not much has changed in terms of UI and strings in general, since most changes over the past few releases have been focused on the level of new and enhanced APIs, not new and enhanced GUI components and other string-bearing-stuff. We'll download the ones we want and put them into the same structure as in yesterday's blog entry.

The requirement we imagine we have is that we want to provide a Spanish translation of our NetBeans Platform application. In the first stage, we're going to get the Spanish JARs we need from Timon Veenstra's project and, after that, for any missing translations, you're going to learn how to supplement the project with your additional localizations.

  1. Go to https://java.net/projects/nb-library-wrappers/sources/core/show/lib-platform-l10n/nb72_platform_l10n/platform.

  2. For the language of your choice, download the JARs you need. I.e., go to 'core', 'lib' and 'modules', find all 'es' JARs, download them (by right-clicking on the JAR and saving it or by checking out the entire project). As described yesterday, create a new module for each language you want to support, switch to the Files window, and create a 'release' folder, on the same level as 'nbproject' and 'src' and then populate that folder with the relevant JARs that you downloaded.



    Brief description of the strings found in each of the above JARs:

    JAR Description
    core_es.jar Strings such as error messages and module loading/installation messages, e.g., MSG_load_layers=Cargando servicios de módulo...
    boot_es.jar Strings such as the question to show the user to find out whether to start a second instance of the application or not.
    org-netbeans-api-search_es.jar Strings for Search Results window, e.g., title of Output tab, as well as "Find in Projects", "Replace in Projects", etc.
    org-netbeans-core-execution_es.jar String for processes, such as external processes, e.g., CTL_PendingExternalProcess2=Proceso: {0}.
    org-netbeans-core-io-ui_es.jar Strings for Output window, e.g., Menu/Window/Output=&Salida.
    org-netbeans-core-multiview_es.jar Strings for working with multiview components, e.g., CTL_Save=Guardar.
    org-netbeans-core-output2_es.jar Strings for windows related to Output window, e.g., LBL_Find_Title=Buscar and Output window tab, e.g., LBL_Close=Cerrar Separador.
    org-netbeans-core-ui_es.jar Strings for the menubar, e.g., Menu/Edit=&Editar and many actions, e.g., OpenAsAction.name=Abrir como...
    org-netbeans-core-windows_es.jar Strings for the window system, e.g., CTL_CloneDocumentAction=C&lonar Documento and Actions/Window=Ventana.
    org-netbeans-core_es.jar Strings related to the About Box, e.g., About=&Acerca de and Exit, e.g., Exit=&Salir.
    org-netbeans-modules-autoupdate-services_es.jar

    org-netbeans-modules-autoupdate-ui_es.jar

    Strings related to the Plugin Manager and the update mechanism, such as install=Instalar de todos modos and InstallUnitWizard_Title=Installer de Plugins.
    org-netbeans-modules-favorites_es.jar Strings for the Favorites window, such as Favorites=Favoritos and ACT_Add=&Agregar a Favoritos.
    org-netbeans-modules-options-api_es.jar

    org-netbeans-modules-options-keymap_es.jar

    Strings related to the Options window, such as CTL_Options_Dialog_Title=Opciones and CTL_Export=Expor&tar and CTL_Keymap_Options=Asi&gnación de Teclas.
    org-netbeans-modules-print_es.jar Strings for the Print and Page Setup features, such as MNU_Print_Action=Im&primir...
    org-netbeans-modules-progress-ui_es.jar Strings for the progress bar, such as Cancel_Question_Title=Cancelar Tarea en Ejecución.
    org-openide-actions_es.jar Strings for many generic actions, such as cut, copy, paste, and delete.
    org-openide-loaders_es.jar Strings relating to files, such as SaveAsTemplate=Guardar como Plantilla...

    As far as I am (currently) aware, the above are the only JARs you need to think about including (if you are creating a generic NetBeans Platform application, as opposed to one that is based on NetBeans IDE and/or uses various kinds of editors, e.g., the NetBeans XML Editor), there are several other JARs in the 'platform' folder, but these don't have strings in them. (One other one to remember is modules/ext/locale/updater.jar.) Also remember that in each case, the above are JARs that contain nothing more than a few properties files, i.e., they're tiny JARS with almost no content at all, aside from the properties files with the translated strings in them.

    Of course, all the other languages are the same as the above, to the extent that they have been translated. I.e., the keys are the same for all languages, but the values are different, obviously since they're all different languages, and the extent to which they have been translated is also different.

  3. Run the application with --locale es or -J-Duser.language=es. Lots of Spanish texts everywhere now, as you can see in the screenshot below. However, not everything has been translated, for various reasons, e.g., the "Show Only Editor" menu item is new in NetBeans IDE 7.4, and hence didn't exist when the 7.2 localization JARs were created:



  4. Right-click the application and choose Branding. Go to the "Internationalization Resource Bundles" tab. Then choose the locale you're interested in, which in this case, since we're working on Spanish, is "es". After that use the search field to look for your string.

    Be very careful if the string, as in the case of "Show Only Editor" has an underline in it, as in this particular case under the "O", which is caused by an ampersand prior to that letter, resulting in the NetBeans Platform creating an accelerator so that the user can use the keyboard to get to that menu item. Therefore, when you do your search for a string that includes an underline, replace the underline with an ampersand prior to the underlined letter, as shown below:



    Once you've found your string, right-click on it in the dialog above, choose "Add to Branding", and then type the, in this case, Spanish translation of the string.

    What's also really cool about the above dialog is that, as you can see above, you now have a pretty good idea in which module the string is found, i.e., which JAR is going to be overridden: 'org-netbeans-core-windows' in this case, with the 'actions' being a package in that JAR.

  5. Now switch to the Files window. Expand the 'branding' folder in the application. You'll notice that, after doing the previous step, NetBeans IDE has automatically created a folder for you named 'org-netbeans-core-windows.jar'. That's a folder. Continue expanding it and in the 'actions' folder you'll find your translated string.



  6. Run the application again and you'll see your translated texts automatically merged with the localization JARs that you downloaded from Timon Veenstra's project.


It would be pretty cool if anyone who supplements the localization JARs with their own translations for any language would let the NetBeans team know, e.g., at the end of this blog entry, or at netbeans dot webmaster at gmail dot com, that you've done a translation and then those translations can be added together and published as a whole for everyone to benefit from.

Adam Bien - July 11, 2014 09:44 AM
WatchDock(er) v0.0.1 Released

watchdock is a simple, but useful http://www.docker.com monitoring application.

watchdock presents you the relevant container information on one page and saves you several CLI keystrokes.

There is no server side installation necessary, you can just launch the application by opening the index.html directly with a modern browser and point to the docker demon. Because watchdock is a web page and it has to communicate with the docker remote services, you will have to enable CORS and expose the monitoring via IP at the docker demon level: -H tcp://0.0.0.0:5555 -api-enable-cors

Installation: git clone https://github.com/AdamBien/watchdock.git

Usage:


cd watchdock
open public_html/index.html

I will use watchdock as one of the sample applications during the Java EE 7 and HTML 5 http://airhacks.com workshops.


Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - July 11, 2014 07:01 AM
How to Bundle Localized NetBeans Modules with Ant Based NetBeans Platform Applications (Part 1)

Let's figure out a solid approach to including localization bundles in our Ant-based NetBeans Platform application. (For Maven, go here.)

  1. Go to https://netbeans.org/downloads. Find the drop-down "IDE Language" at the top right of the page. Choose your language. Click Download under the Download Bundle you need, which is most likely to be "Java SE".

  2. Install the download bundle. If you already have NetBeans IDE 8.0 installed, you'll need to first uninstall it because the download bundle will discover, right at the start of the installation procedure, that NetBeans IDE 8.0 is already installed. So uninstall your NetBeans IDE and then reinstall using the new download bundle.

  3. Start up NetBeans IDE. Open your NetBeans Platform project into it.

  4. For each language for which you want to provide support, create a new module. That's a modular solution, each language in its own module. Switch to the Files window and there, at the same level as 'nbproject' and 'src', create a folder 'release/core/locale' and a folder 'release/modules/locale', containing all the JARs from the download bundle that you'd like to include in the module:

    The above entails that you need to look in your NetBeans IDE installation folder, in the 'locale' folder of the 'platform' folder for the JARs applicable to your language that are relevant to your application. Note that 'core' and 'modules' above match the 'core' and 'modules' subfolder of 'platform' where the JARs above are found:


  5. Continue doing the above until you have all the JARs that you need. Make as many modules as there are languages that you'd like to support for which translated JARs exist.

  6. Bear in mind that if you have a locale like "pt_BR", then this is the way you specify the second part, in the 'run.args.extra' line and/or in the default_options line in the .conf file of the application.
    run.args.extra=--laf Nimbus -J-Duser.language=pt -J-Duser.region=BR 
  7. Run the application and see, for example, the following, i.e., below the fact that org-netbeans-core-ui_pt_BR.jar is included means that the menubar, among other UI pieces, is now in Portuguese (Brazil):

That's it. Interested to know what NetBeans Platform developers out there think of this. It's all pretty nice except for the fact that you need to figure out in which JAR the texts are found that are of interest to your application. In another blog entry I'll suggest some approaches for that, though the simplest approach is to simply include all the localized JARs for your language from the 'platform' folder. They don't contain anything other than properties files, i.e., they're really small.

Java Evangelist John Yeary's Blog - July 10, 2014 09:02 PM
JSF 2.x Tip of the Day: Encoding Text for XML

I have a simple method to encode text to display inside an XML page, or to use inside other XML/JS for example SyntaxHighlighter.

XMLEncode


Geertjan's Blog - July 10, 2014 08:50 AM
org.openide.util.ContextGlobalProvider

In many scenarios with the NetBeans Platform, such as the NetBeans Platform CRUD Tutorial, you have two windows that need to interact with each other whilst being in two different modules.

The standard advice in this above scenario is to publish an object, e.g., Customer, into the Lookup, via one TopComponent (typically a viewer window), while the other TopComponent (typically an editor window) subscribes to that object. But to which Lookup should the second TopComponent subscribe? The global Lookup? In that case, when any TopComponent is selected that does not have the Customer in its Lookup, the global Lookup will not have the Customer available either. Normally, if this is a problem, you subscribe to the Lookup of the first TopComponent, which means your TopComponents are now tightly coupled to each other.

Tim Boudreau's blog, here, summarizes how you can replace the global Lookup with your own ContextGlobalProvider, while Bruce Schubert, here on NetBeans Zone and here on the NetBeans Wiki, goes into a lot more detail. Read the related javadoc, too.

Below, I've tried to simplify Bruce's code significantly, specifically for the Customer object in the NetBeans Platform CRUD Tutorial. Copy the code below, paste it into any module in your application, make sure to set an implementation dependency in that module on the Window System API, since an internal class is referenced. Then, whenever the context switches, e.g., a different TopComponent is selected, one that does not provide a Customer object in its Lookup, the last published Customer object is made available. And you can continue using Utilities.actionsGlobalContext().lookupResult(Customer.class) without a problem, i.e., your TopComponents will remain disconnected from each other.

More comments and explanations below, by Bruce, tweaked slightly here and there by me, all errors and mistakes my own responsibility.

package org.shop.editor;

import demo.Customer;
import java.util.Collection;
import org.netbeans.modules.openide.windows.GlobalActionContextImpl;
import org.openide.util.ContextGlobalProvider;
import org.openide.util.Lookup;
import org.openide.util.Lookup.Result;
import org.openide.util.LookupEvent;
import org.openide.util.LookupListener;
import org.openide.util.lookup.AbstractLookup;
import org.openide.util.lookup.InstanceContent;
import org.openide.util.lookup.ProxyLookup;
import org.openide.util.lookup.ServiceProvider;

/**
 * This class proxies the original ContextGlobalProvider and ensures the current
 * customer remains in the GlobalContext regardless of the TopComponent
 * selection.
 *
 * To use this class you must edit the Windows System API module dependency:
 * change the dependency to an implementation version so that the
 * org.netbeans.modules.openide.windows package is on the classpath.
 *
 * @see ContextGlobalProvider
 * @see GlobalActionContextImpl
 * @author Bruce Schubert & Geertjan Wielenga
 */
@ServiceProvider(
        service = ContextGlobalProvider.class,
        supersedes = "org.netbeans.modules.openide.windows.GlobalActionContextImpl")
public class GlobalActionContextProxy implements ContextGlobalProvider {

    /**
     * The proxy lookup returned by this class:
     */
    private Lookup proxyLookup;
    /**
     * The native NetBeans global context lookup provider and
     * the official global lookup managed by the NetBeans Platform:
     */
    private final GlobalActionContextImpl globalContextProvider;
    private final Lookup globalContextLookup;
    private final LookupListener globalLookupListener;
    /**
     * Additional customer content for our custom global lookup:
     */
    private Lookup customerLookup;
    private final InstanceContent customerInstanceContent;
    private final Result<Customer> resultCustomers;
    /**
     * The last customer selected:
     */
    private Customer lastCustomer;
    /**
     * Critical section lock:
     */
    private final Object lock = new Object();

    public GlobalActionContextProxy() {
        this.customerInstanceContent = new InstanceContent();
        // The default GlobalContextProvider:
        this.globalContextProvider = new GlobalActionContextImpl();
        this.globalContextLookup = this.globalContextProvider.createGlobalContext();
        // Monitor the existance of a Customer in the official global lookup:
        this.resultCustomers = globalContextLookup.lookupResult(Customer.class);
        this.globalLookupListener = new LookupListenerImpl();
        this.resultCustomers.addLookupListener(this.globalLookupListener);
    }

    /**
     * Returns a ProxyLookup that adds the current Customer instance to the
     * global selection returned by Utilities.actionsGlobalContext().
     *
     * @return a ProxyLookup that includes the original global context lookup.
     */
    @Override
    public Lookup createGlobalContext() {
        if (proxyLookup == null) {
            // Create the two lookups that will make up the proxy:
            customerLookup = new AbstractLookup(customerInstanceContent);
            proxyLookup = new ProxyLookup(globalContextLookup, customerLookup);
        }
        return proxyLookup;
    }

    /**
     * This class listens for changes in the Customer results, and ensures a
     * Customer remains in the Utilities.actionsGlobalContext() if a customer is
     * open.
     */
    private class LookupListenerImpl implements LookupListener {
        @Override
        public void resultChanged(LookupEvent event) {
            System.out.println("resultChanged: Entered...");
            synchronized (lock) {
                // First, handle customers in the principle lookup
                if (resultCustomers.allInstances().size() > 0) {
                    // Clear the proxy, and remember this customer. 
                    // Note: not handling multiple selection of customers.
                    clearCustomerLookup();
                    lastCustomer = resultCustomers.allInstances().iterator().next();
                    System.out.println("resultChanged: Found customer ["
                            + lastCustomer.getName()
                            + "] in the normal lookup.");
                } else {
                    // Add the last used customer to our internal lookup
                    if (lastCustomer != null) {
                        updateCustomerLookup(lastCustomer);
                    }
                }
            }
        }
    }

    /**
     * Unconditionally clears the customer lookup.
     */
    private void clearCustomerLookup() {
        Collection<? extends Customer> customers = customerLookup.lookupAll(Customer.class);
        for (Customer customer : customers) {
            customerInstanceContent.remove(customer);
        }
    }

    /**
     * Replaces the customer lookup content.
     *
     * @param customer to place in the customer lookup.
     */
    private void updateCustomerLookup(Customer customer) {
        if (customer == null) {
            throw new IllegalArgumentException("customer cannot be null.");
        }
        // Add the customer if an instance of it is not already in the lookup
        if (customerLookup.lookup(Customer.class) == null) {
            clearCustomerLookup();
            customerInstanceContent.add(customer);
            System.out.println("updateCustomerLookup: added ["
                    + lastCustomer.getName()
                    + "] to the proxy lookup.");
        }
    }

}

Adam Bien - July 10, 2014 08:49 AM
The 4th Airhacks.io Question && Answers Show

The first non-interactive (re-recorded) airhacks show. We had a short connectivity problem in the middle of the show. It was easier for me to record the show again, instead of editing the file.

Thanks for the interactions, particularly from the IRC #airacks channel and twitter.

Any questions left? Then join the conversation at each first Monday of the month at 6 P.M. live. No registration or any other commitment required. Btw. alle dates for 2014 are scheduled: http://www.ustream.tv/channel/adambien.

See also other screencasts at: http://tv.adam-bien.com or subscribe to http://www.youtube.com/user/bienadam.

See you at Java EE Workshops at MUC Airport or on demand and in a location very near you: airhacks.io!


Real World Java EE Workshops [Airport Munich]>

Geertjan's Blog - July 09, 2014 02:05 PM
Book Review: JavaFX 8 -- Introduction by Example

JavaFX 8: Introduction by Example is the book that you absolutely must get hold of if you're interested in JavaFX in any way at all. The authors (Carl Dea, Mark Heckler, Gerrit Grunwald, José Pereda, and Sean Phillips) are all awesome and famous in the JavaFX community and the chapters are purely practical and useful, and well written, and even humorous at times. You couldn't ask for a better combination of people and topics in a book dedicated to JavaFX.

The chapters are as follows:

  1. Getting Started
  2. JavaFX Fundamentals
  3. Lambdas and Properties
  4. Layouts and UI Controls
  5. Graphics with JavaFX
  6. Custom UIs
  7. Media with JavaFX
  8. JavaFX on the Web
  9. JavaFX 3D
  10. JavaFX and Arduino
  11. JavaFX on the Raspberry Pi
  12. JavaFX and Gestures

My current interest lies in the Raspberry Pi and so I was very pleased to find the JavaFX and Raspberry Pi chapter by Mark Heckler and José Pereda and dove in immediately:

It's kind of geek humor, but I found it quite funny to read the EPUB version of the book, i.e., a book all about JavaFX, in an EPUB Reader that I've made... in JavaFX! Maybe I'll get to deploy it to the Raspberry Pi soon (once I figure out how to connect my LCD display to the Raspberry Pi):

The entire book can be seen as a NetBeans IDE tutorial, since NetBeans IDE is used from beginning to end, which is awesome. Aside from that, everything is useful and practical and, as I said above, you should buy it immediately. As in, right now, this minute: http://www.apress.com/9781430264606

NetBeans Zone - The social network for developers - July 09, 2014 12:35 PM
NetBeans Weekly News (Issue #647 - July 08, 2014)

Project News Do the NetBeans IDE 8.0 Satisfaction Survey Today! Fill out a quick survey to help the NetBeans team, today! We'd like to know how the new NetBeans 8.0 has been working for you! In about 5 minutes, give the NetBeans team your feedback in this quick survey! Preview Text:  In this issue: Win a free ticket to JavaOne courtesy of...

Adam Bien - July 09, 2014 09:30 AM
Java EE 7 Sample With JPA Integration Tests Released

The v0.0.3 version of Java EE Boundary Control Entity project is available.

New in this version are automated JPA integration tests:


public class RegistrationIT {

    EntityManager em;
    EntityTransaction tx;

    @Before
    public void initEM() {
        this.em = Persistence.createEntityManagerFactory("integration-test").createEntityManager();
        this.tx = this.em.getTransaction();
    }
  (...)
}

Execute:


mvn archetype:generate -Dfilter=com.airhacks:javaee-bce-archetype

then


mvn clean install
mvn failsafe:integration-test

See you at Java EE Workshops at MUC Airport or on demand and in a location very near you: airhacks.io!


Real World Java EE Workshops [Airport Munich]>