Thilina's Blog

I might be wrong, but…

MATLAB GUI programming (code level) 2.0 – Undocumented MATLAB – JAVA codes in MATLAB M-files


This is something I found really interesting in MATLAB. We can write m-scripts with JAVA codes, this is very useful when designing UI components for MATLAB applications. In this article I will share my experience on creating GUI in MATLAB using JAVA and also an implementation of video cropping software (backend part will be discussed on my next article).

For more information on Undocumented MATLAB, please visit Undocumented MATLAB official web page.

When using JAVA codes in *.m files we do not use “new” keywords to initiate any objects.  I am not sure the usage of import keyword in MATLAB/JAVA. Therefore JFrame must be used as  java.swing.JFrame. It is quite different from JAVA.

JFrame frame = new JFrame; // Java Syntax
frame = javax.swing.JFrame; % matlab syntax

Continue reading

2012 May 30 Posted by | Java, MATLAB | , , , , , , | 8 Comments

   

%d bloggers like this: