How to change the look of tMsgBox to client native in Talend Studio

by | Oct 31, 2014 | BlogPosts, Tech Tips

User Case

Sometimes if you are performing black boxing on your Talend Jobs and you have “tMsgBox” pop-ups you might want to change the look of the message box.
For example: You want to have a native windows look, or a native Mac OS X look. Unfortunately there is no way to set that option in Talend Studio, however with a little bit of Java and a “tJava” component it can be accomplished. Follow the guide below to find out how.

Native Look

  1. Create a New Talend Studio Job, or use any existing one that has “tMsgBox” components;
  2. Add a “tJava” component;
  3. Link it using the “OnComponentOk” at the beginning of your Job;
  4. Add the code below to the “tJava” component;

for javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { javax.swing.UIManager.setLookAndFeel( javax.swing.UIManager.getSystemLookAndFeelClassName() ); }

  1. Run your Job;

If you are on Windows then you should see:

tMsgBox_Windows

If you are on Linux (Ubuntu-Gnome in the example) then you should see:

tMsgBox_Linux

Instead of the standard:

clip_image003

Since you have added the “tJava” component at the beginning of the Job the setting will be applied to the entire job, so all of the “tMsgBox” components and any custom components that use a prompting window will inherit the native interface instead of the default Talend Studio interface. This could be helpful for black boxing Talend jobs.

0 Comments