Create a Java-Mathworks GUI table from your structure in a separate window. Table can be: edited by the user, resized, hidden, confirmed. You can easily display the predefined size of the table to the user, he then edits the data (aka Array or Matrix Editor in MATLAB) and you can import/export the data afterwards. This feature is missing in GUI, can be accessed only from calling java functions in an external window with programmed properties. You can add and program buttons for actions related to the table afterwards, or access data from command line.
Tested in MATLAB R12 R13 R14.
Should be understood as an example on how to do the Java tables, not as a fixed product on tables in MATLAB.
Andrej Mosat (2021). GUI_sheet ; Java GUI table from MATLAB (https://www.mathworks.com/matlabcentral/fileexchange/5752-gui_sheet-java-gui-table-from-matlab), MATLAB Central File Exchange. Retrieved .
@ M R
% matlab style
set(co, 'HeaderVisible', true);
set(co, 'Resizable', true);
% java stye
Working great with R14 but in MatLAB 2014 I receive this error:
Error using gui_sheet (line 77)
Parameter must be scalar.
Line 7 is this:
set(co, 'HeaderVisible', 'on');
Any solution or update for recent version of MATLAB?
Simple and elegant. Thank you!
If this is still active, should the "License" be updated to be the GNU GPL (1,2,3) or restated as a Google Public License? The text "GPL (www.google.com)" can be misinterpreted....
Also, my compliments for facing down the demons of awt and friends! ;-)
Hi All, I have a issue to solve.
I already have an application from where I'd love to call your table code to show some values. The problem is that I need to generate an executable file to run on other machines without Matlab installed. To do this I use the mbuild -setup command, choose my compiler (Microsoft Visual C/C++ version 6.0) and the mcc -m command. It seems that the gui_sheet.m uses java, so I wonder know how I could generate this executable that gather all my files along with the one you made available on net.
Thanks in advance,
To: Wojciech Chojnowski
Yes, you have to set the table object as editable.
From the code:
% setting the behaviour of the table (can be found in java awt documentation, or methods of java table)
should do the trick.
I don`t know if something changed in java AWT in Matlab 2006b, but presumably not.
Try to debug the application and see the methods/properties of the object "b", which is the java AWT Table object instance. There should be something like "editable" property.
stop at the point b.setExcelMode(1);
and in the matlab command line press:
I hope this helps if not, blame mathworks for it :-)
Is it possible to change values in table? Using Matlab R2006b I can resize table and columns but can't change cell value.
nice piece of work.
cool stuff dude
Simple but though, but still need more improvement
Planning a new version. As the printing in Java is rather complicated (for me :-) I don`t know if I can handle it alone within 2 months. Experiments show, that printing involves setting up a page object, rendering the framebuffer and putting this to printable object. Actually what u see is what u get. This delivers many problems: e.g. fonts, line thickness, ... Also java 1.4.2 - 1.5.x seems to have some bug with linux printing. Thank you for ratings.
Does what it claims. Simple, nice. Saving this figure to an image file would be nice.
It would be nice if this was feature in GUIDE it self
Guide really needs some sort of table to display data. This is great!
Nice implementation for a missing feature! It is platform independant, which is not the case of most "COM"-based hacks.
Matlab should definetly include this (or better a GUIDE element like this) in the next release.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!