Rank: 131897 based on 0 downloads (last 30 days) and 0 file submitted
Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Sebastian View all
Updated File Comments Rating
27 Oct 2013 FindJObj - find java handles of Matlab graphic objects Find java objects contained within a specified java container or Matlab GUI handle Author: Yair Altman

Dear Yair;
Sorry about the confusion - my comments doesn't seem to have posted correctly.
I have used your excelent findobj on many occasions but today discovered a strange behaviour. When nesting many panels inside each, findjobj does not seem to be able to find that underlying java table handle. As a simple example:

subpanel1 = uipanel('Parent', gcf, 'units','normalized','Position',[0 0 1 1]);
subpanel2 = uipanel('Parent', subpanel1, 'units','normalized','Position',[0 0 1 1]);
subpanel3 = uipanel('Parent', subpanel2, 'units','normalized','Position',[0 0 1 1]);
subpanel4 = uipanel('Parent', subpanel3, 'units','normalized','Position',[0 0 1 1]);

% This works correctly
mTable= uitable('Parent',subpanel3,'Units','normalized',...
'Position',[0.02 0.14 0.96 0.84]);

jHandle = findjobj(mTable)

% This does not work - findjobj returns empty
mTable2= uitable('Parent',subpanel4,'Units','normalized',...
'Position',[0.02 0.14 0.96 0.84]);

jHandle2 = findjobj(mTable2)

Any thoughts?
Best regards
Sebastian

27 Oct 2013 FindJObj - find java handles of Matlab graphic objects Find java objects contained within a specified java container or Matlab GUI handle Author: Yair Altman

27 Oct 2013 FindJObj - find java handles of Matlab graphic objects Find java objects contained within a specified java container or Matlab GUI handle Author: Yair Altman

Dear Yair;
Adding to my previous comment, I have noticed that findjobj(gcf,'class','uitable') correctly finds the handle also in the later case. The trouble with this in my case is that I have several tables in the GUI and this returns a vector of all tables and all I have found no way to distinguish between these to extract the particular one that I want.
Best Regards
Sebastian

Contact us