boolean isOwner = model.isObjectOwner();
    private JPanel buildPermissions(final PermissionData permissions)    {        JPanel content = new JPanel();        double[][] tl = {{TableLayout.PREFERRED,         				TableLayout.FILL}, //columns        				{TableLayout.PREFERRED, TableLayout.PREFERRED,        					TableLayout.PREFERRED} }; //rows        content.setLayout(new TableLayout(tl));        content.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));        //The owner is the only person allowed to modify the permissions.        boolean isOwner = model.isObjectOwner();        //Owner        JLabel label = UIUtilities.setTextFont(OWNER);        JPanel p = new JPanel();        JCheckBox box =  new JCheckBox(READ);        box.setSelected(permissions.isUserRead());        box.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent e)            {               JCheckBox source = (JCheckBox) e.getSource();               permissions.setUserRead(source.isSelected());               view.setEdit(true);            }        });        box.setEnabled(isOwner);        p.add(box);        box =  new JCheckBox(WRITE);        box.setSelected(permissions.isUserWrite());        box.addActionListener(new ActionListener() {                    public void actionPerformed(ActionEvent e)            {               JCheckBox source = (JCheckBox) e.getSource();               permissions.setUserWrite(source.isSelected());               view.setEdit(true);            }                });        box.setEnabled(isOwner);        p.add(box);        content.add(label, "0, 0, l, c");        content.add(p, "1, 0, l, c");          //Group        label = UIUtilities.setTextFont(GROUP);        p = new JPanel();        box =  new JCheckBox(READ);        box.setSelected(permissions.isGroupRead());        box.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent e)            {               JCheckBox source = (JCheckBox) e.getSource();               permissions.setGroupRead(source.isSelected());               view.setEdit(true);            }        });        box.setEnabled(isOwner);        p.add(box);        box =  new JCheckBox(WRITE);        box.setSelected(permissions.isGroupWrite());        box.addActionListener(new ActionListener() {                    public void actionPerformed(ActionEvent e)            {               JCheckBox source = (JCheckBox) e.getSource();               permissions.setGroupWrite(source.isSelected());               view.setEdit(true);            }        });        box.setEnabled(isOwner);        p.add(box);        content.add(label, "0, 1, l, c");        content.add(p, "1,1, l, c");         //OTHER        label = UIUtilities.setTextFont(WORLD);        p = new JPanel();        box =  new JCheckBox(READ);        box.setSelected(permissions.isWorldRead());        box.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent e)            {               JCheckBox source = (JCheckBox) e.getSource();               permissions.setWorldRead(source.isSelected());               view.setEdit(true);            }        });        box.setEnabled(isOwner);        p.add(box);        box =  new JCheckBox(WRITE);        box.setSelected(permissions.isWorldWrite());        box.addActionListener(new ActionListener() {                    public void actionPerformed(ActionEvent e)            {               JCheckBox source = (JCheckBox) e.getSource();               permissions.setWorldWrite(source.isSelected());               view.setEdit(true);            }        });        box.setEnabled(isOwner);        p.add(box);        content.add(label, "0, 2, l, c");        content.add(p, "1, 2, l, c");         return content;    }