How to turn off java error in matlab command window
16 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have build a Gui using guide as well as some java integration. Mainly a jtable using findjobj and Java Classes from Y. Altman. Snippet of table creation is below. When loading new data, I often get a java error like the following:
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1 >= 1
at java.util.Vector.elementAt(Unknown Source)
at javax.swing.table.DefaultTableColumnModel.getColumn(Unknown Source)
What am I doing wrong in creating the jtable, as the error does not affect Matlab but is confusing to the people using the gui. Any way to supress it or get rid of it? Thanks a bunch. Ravi
Matlab Code:
%LOAD JAVA HANDLE, UITABLE NEEDS TO BE VISIBLE
set(handles.eis_data_table,'Visible','on')
jscroll = functions.java_table.findjobj(handles.eis_data_table,'persist');
jtable = jscroll.getViewport.getComponent(false);
%GET MATLAB TABLE DATA AND FORM INTO JAVA TABLE DATA
EIS_DATA_TABLE = get(handles.eis_data_table,'Data');
%SET DATA MODEL
jtable.setModel(javax.swing.table.DefaultTableModel(EIS_DATA_TABLE,
get(handles.eis_data_table,'ColumnName')));
0 Commenti
Risposte (1)
Image Analyst
il 22 Nov 2015
See attached function that I use to suppress some warnings. There are instructions in there to figure out how to find and suppress a new warning that you may have. But I don't think you can suppress an exception though, which is what you have.
2 Commenti
Image Analyst
il 23 Nov 2015
I suggest you call the Mathworks technical support to figure out why you're getting the Java error in the first place.
Vedere anche
Categorie
Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!