MATLAB: Do I have issues with the MATLAB desktop on Ubuntu 9.04

MATLAB

I have the following issues on my Ubuntu 6.04 machine when I use MATLAB 7.7 (R2008b).
1. The text in the text-box in the "Path" field and the "save-as" window sometimes becomes invisible, with letter under the cursor becoming visible, getting jumbled.
2. Though the cursor is focused on the command window, sometimes, randomly, the command window becomes unresponsive and takes in no text (This has also been observed in MATLAB (32-bit MATLAB on a 32-bit Ubuntu), which I would usually resolve by undocking it and docking it again.
3. The controls in GUIDE become messy when designing. The removed text-boxes, buttons etc. appear when I click on the space where they used to be.

Best Answer

This issue is due to a bug in a video driver in Ubuntu. For more information please see this Sun bug report at:
<http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6776352>
To work around this issue, add the following line into the java.opts file:
-Dsun.java2d.pmoffscreen=false
To create java.opts file, please follow these steps:
1. Create a text file named java.opts in the $MATLABROOT/bin/$ARCH directory. If you do not have write-access to $MATLABROOT/bin/$ARCH, or if you want a user-specific version, create the java.opts file in the MATLAB startup directory.
$MATLABROOT is the MATLAB root directory, which you find by typing at the MATLAB Command Prompt:
matlabroot
$ARCH is your system architecture, which you find by typing at the MATLAB Command Prompt:
computer('arch')
The MATLAB startup directory can be found in two ways:
a) If you launch MATLAB from the command line, it is the current working directory in the command-line window.
b) If you launch MATLAB from a desktop icon, execute the following at the first MATLAB Command Prompt (before any MATLAB code is executed):
pwd
After placing the commands above into the java.opts file restart MATLAB. You will need to restart MATLAB after each change to the java.opts file.