MATLAB: Do UICONTROL and Java objects appear pixellated when I print them from MATLAB

exportMATLABpoorprintresolutionuicontroluicontrols

I would like to create pages with graphics, tables, text, etc. I have found the best way to do this is to use a MATLAB figure and import Java objects to this figure. The problem arises when I do the following:
text(.5,.5,'Hello world');
import javax.swing.JLabel;
j = JLabel('Hello World');
javacomponent(j,[100,50,100,100]);
When I print the resulting figure, the Java object appears pixellated. The quality is not suitable for my application.

Best Answer

This is a limitation in printing Java components in MATLAB. Java components are converted to bitmaps at the beginning of the print process. Bitmaps do not scale well, so when the figure is then scaled for printing, the jagged edges of the text become exaggerated.
There are no workarounds that produce high-quality printouts of Java components from a MATLAB figure window.
By making sure that the figure is not scaled for printing, you might achieve more optimal results.