Java Cheat Sheet: Difference between revisions
Jump to navigation
Jump to search
imported>Scott No edit summary |
imported>Scott No edit summary |
||
Line 4: | Line 4: | ||
== Matlab == | == Matlab == | ||
; javaObject : ''Documented'' (7.0-2010) - Invoke a Java object constructor letting MATLAB choose the thread. | ; javaObject : ''Documented'' (7.0-2010) - Invoke a Java object constructor letting MATLAB choose the thread. | ||
Line 18: | Line 12: | ||
;javacomponent : ''Undocumented'' (7.0-2010) - Create a Java Swing Component and put it in a figure. | ;javacomponent : ''Undocumented'' (7.0-2010) - Create a Java Swing Component and put it in a figure. | ||
<pre> | <pre> | ||
f = figure; | f = figure; | ||
b = javacomponent({'javax.swing.JButton','Hello'}, [], f, {'ActionPerformed','disp Hi'}); | b = javacomponent({'javax.swing.JButton','Hello'}, [], f, {'ActionPerformed','disp Hi'}); | ||
</pre> | </pre> | ||
Line 28: | Line 19: | ||
;java.lang.System.getProperties() : Get/Set java system properties. | ;java.lang.System.getProperties() : Get/Set java system properties. | ||
<pre> | <pre> | ||
p = java.lang.System.getProperties(); | p = java.lang.System.getProperties(); | ||
p.setProperty('derby.stream.error.file', fullfile(evridir,'derby.log')); | p.setProperty('derby.stream.error.file', fullfile(evridir,'derby.log')); | ||
</pre> | </pre> | ||
== Links == | == Links == | ||
[http://undocumentedmatlab.com/] |
Revision as of 10:50, 21 July 2010
Java programming notes and resources.
Matlab
- javaObject
- Documented (7.0-2010) - Invoke a Java object constructor letting MATLAB choose the thread.
X = javaObject('java.awt.Color', 0.1, 0, 0.7)
- JavaFrame
- Undocumented (7.0-2010) - Get underlying Java Frame from figure.
get(hFig,'JavaFrame')
- javacomponent
- Undocumented (7.0-2010) - Create a Java Swing Component and put it in a figure.
f = figure; b = javacomponent({'javax.swing.JButton','Hello'}, [], f, {'ActionPerformed','disp Hi'});
Java
- java.lang.System.getProperties()
- Get/Set java system properties.
p = java.lang.System.getProperties(); p.setProperty('derby.stream.error.file', fullfile(evridir,'derby.log'));