table = findjobj(handles.cutTable); %findjobj is in the file exchange
table1 = get(table,'Viewport');
jtable = get(table1,'View');
renderer = jtable.getCellRenderer(2,2);
renderer.setHorizontalTextPosition(javax.swing.swingConstants.CENTER);
This doesn't throw any errors, but it also doesn't seem to change anything. I eventually want to set all the cells to center. What am I doing wrong? My Java isn't good, and I've never tried doing anything with the underlying Java in Matlab before.