}
public void update()
{
SnapGridLayout layout = new SnapGridLayout(10, 10, 500, 200);
ClientResource cr = getFactory().getClientResource();
if (isCreated()) {
getJPanel().removeAll();
getJPanel().setLayout(layout);
DataModel dm;
JComponent comp;
JLabel label;
MultiplePropertyEntry numberColumnProps = new MultiplePropertyEntry();
numberColumnProps.append(new SinglePropertyEntry("Font", "Courier-BOLDITALIC-14"));
numberColumnProps.append(new SinglePropertyEntry("Foreground", "pink"));
numberColumnProps.append(new SinglePropertyEntry("Background", "blue"));
numberColumnProps.append(new SinglePropertyEntry("Alignment", "1"));
try {
int y = 0;
int xfield = 4;
int wfield = 6;
int wlabel = 4;
dm = getModel().getChild("productNumber");
comp = createFieldValue(dm);
numberColumnProps.change(comp, this.getFactory());
label = new JLabel(cr.getLabel("productNumber"));
layout.addLayoutComponent(label, 0, y, wlabel, 1);
layout.addLayoutComponent(comp, xfield, y, wfield, 1);
getJPanel().add(label);
getJPanel().add(comp);
++y;
dm = getModel().getChild("name");
comp = createFieldValue(dm);
label = new JLabel(cr.getLabel("name"));
layout.addLayoutComponent(label, 0, y, wlabel, 1);
layout.addLayoutComponent(comp, xfield, y, wfield, 1);
getJPanel().add(label);
getJPanel().add(comp);
++y;
dm = getModel().getChild("description");
comp = createFieldValue(dm);
label = new JLabel(cr.getLabel("description"));
layout.addLayoutComponent(label, 0, y, wlabel, 1);
layout.addLayoutComponent(comp, xfield, y, wfield, 2);
getJPanel().add(label);
getJPanel().add(comp);
y+=2;
dm = getModel().getChild("stock");
comp = createFieldValue(dm);
label = new JLabel(cr.getLabel("stock"));
layout.addLayoutComponent(label, 0, y, wlabel, 1);
layout.addLayoutComponent(comp, xfield, y, wfield, 1);
getJPanel().add(label);
getJPanel().add(comp);
++y;