readme.txt

来自「该程序提供一种在matlab中调用java.awt和javax.swing库的方」· 文本 代码 · 共 39 行

TXT
39
字号
Unzip these functions to a folder named '@jcontrol' somewhere on your MATLAB path.

You can then construct a jcontrol object in MATLAB e.g.:

>> myObject=jcontrol(gcf,'javax.swing.JPanel')

myObject = 

	jcontrol object: 1-by-1

>> get(myObject)

ans = 

    	hgcontainer: [1x1 hgjavacomponent]
      	hgcontrol: [1x1 javahandle_withcallbacks.javax.swing.JPanel]
      	 hghandle: 2.0012

>>

You can then access the MATLAB graphics container and its java object using GET and SET in the usual way,
either by accessing the individual components or by accessing the jcontrol.

You can also use MATLAB '.' syntax. This also provides access to the java object's methods:

myObject.set......
myObject.get......
myObject.is........

Type helpwin jcontrol at the MATLAB prompt for more information.


Also see the jcontrolDemo function in the zip. This should not go in the '@jcontrol' folder.



Malcolm Lidierth
07/07

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?