%% Change Appearance of Table Cells
% Change the background color for a table column by creating a style and applying it to the table.
% Create a figure with a table UI component in it and populate the table with numeric data.

fig = uifigure;
fig.Position = [500 500 520 220];
uit = uitable(fig);
uit.Data = rand(5);
uit.Position = [20 30 480 135];

%
%
% Then, create a style with a specific background color and add the style to the second column of the table using the addStyle function.

s = uistyle('BackgroundColor','red');
addStyle(uit,s,'column',2)

%
% Copyright 2019 The MathWorks, Inc.