Index: /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLit.java
===================================================================
--- /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLit.java	(revision 27016)
+++ /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLit.java	(revision 27017)
@@ -46,5 +46,5 @@
 				int idx = visibilities.get(vis);
 				if (idx == visibilityBox.getSelectedIndex())
-					dlg.mark.setLightVisibility(vis);
+					dlg.mark.setVisibility(vis);
 			}
 		}
Index: /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSectors.java
===================================================================
--- /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSectors.java	(revision 27016)
+++ /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSectors.java	(revision 27017)
@@ -1,116 +1,150 @@
 package oseam.panels;
 
+import java.awt.*;
 import java.awt.event.*;
-import java.util.ArrayList;
 
 import javax.swing.*;
+import javax.swing.table.*;
 
 import oseam.dialogs.OSeaMAction;
 import oseam.seamarks.*;
+import oseam.seamarks.SeaMark.*;
 
-public class PanelSectors extends JFrame {
+public class PanelSectors extends JPanel {
 
 	private OSeaMAction dlg;
-	public JPanel panel;
-	public JButton minusButton;
-	public JButton plusButton;
-	public JTable table;
-	private JScrollPane tablePane;
-	private ActionListener alMinusButton;
-	private ActionListener alPlusButton;
+	private TableModel model;
+	private JTable table;
+	private JFrame frame;
+
+	// public JPanel panel;
+	// public JButton minusButton;
+	// public JButton plusButton;
+	// private JScrollPane tablePane;
+	// private ActionListener alMinusButton;
+	// private ActionListener alPlusButton;
 
 	public PanelSectors(OSeaMAction dia) {
-		super("Sector Table");
 		dlg = dia;
-		lights = new ArrayList<Object[]>();
-		lights.add(new Object[]{null, null, null, null, null, null, null, null, null, null, null, null});
-		panel = new JPanel();
-		this.setSize(700, 100);
-		panel.setBounds(0, 0, 700, 512);
-		this.getContentPane().add(panel);
-		table = new JTable();
-		tablePane = new JScrollPane(table);
-		tablePane.setBounds(40, 0, 660, 34);
-		panel.setLayout(null);
-		panel.add(tablePane);
-
-		alMinusButton = new ActionListener() {
-			public void actionPerformed(java.awt.event.ActionEvent e) {
-				deleteSector(2);
-			}
-		};
-		minusButton = new JButton(new ImageIcon(getClass().getResource("/images/MinusButton.png")));
-		minusButton.setBounds(0, 0, 32, 34);
-		minusButton.addActionListener(alMinusButton);
-		panel.add(minusButton);
-
-		alPlusButton = new ActionListener() {
-			public void actionPerformed(java.awt.event.ActionEvent e) {
-				addSector(2);
-			}
-		};
-		plusButton = new JButton(new ImageIcon(getClass().getResource("/images/PlusButton.png")));
-		plusButton.setBounds(0, 34, 32, 34);
-		plusButton.addActionListener(alPlusButton);
-		panel.add(plusButton);
+		model = new SectorTable();
+		table = new JTable(model);
+		table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
+		frame = new JFrame("Sector Table");
+		frame.getContentPane().add(new JScrollPane(table));
+		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 	}
 
-	public int getSectorCount() {
-		return getRowCount();
+	private class SectorTable extends AbstractTableModel {
+
+		private String[] headings = { "Sector", "Colour", "Character", "Group", "Period", "Height", "Range", "Visibility", "Start", "End" };
+		
+		public SectorTable() {
 	}
 
-	public void addSector(int idx) {
-		lights.add(idx, new Object[]{null, null, null, null, null, null, null, null, null, null, null, null});
-		tablePane.setSize(660, ((getRowCount() * 16) + 18));
-		if (getRowCount() > 3) {
-			this.setSize(700, ((getRowCount() * 16) + 40));
-		} else {
-			this.setSize(700, 100);
-		}
-//		light.fireTableRowsInserted(idx, idx);
+	public String getColumnName(int col) {
+		return headings[col];
 	}
 
-	public void deleteSector(int idx) {
-		lights.remove(idx);
-		tablePane.setSize(660, ((getRowCount() * 16) + 18));
-		if (getRowCount() > 3) {
-			this.setSize(700, ((getRowCount() * 16) + 40));
-		} else {
-			this.setSize(700, 100);
-		}
-//		light.fireTableRowsDeleted(idx, idx);
+	public int getColumnCount() {
+		return headings.length;
 	}
 
-	private String[] columns = { "Sector", "Start", "End", "Colour",
-			"Character", "Group", "Period", "Height", "Range", "Visibility" };
-	private ArrayList<Object[]> lights;
-
-	private String getColumnName(int col) {
-		return columns[col].toString();
+	public int getRowCount() {
+		return dlg.mark.getSectorCount() - 1;
 	}
 
-	private int getColumnCount() {
-		return columns.length;
+	public boolean isCellEditable(int row, int col) {
+		return (col > 0);
 	}
 
-	private int getRowCount() {
-		return lights.size()-1;
+	public Class getColumnClass(int col) {
+		switch (col) {
+		case 1:
+			return Col.class;
+		case 7:
+			return Vis.class;
+		default:
+			return String.class;
+		}
 	}
-
-	private Object getValueAt(int row, int col) {
-		if (col == 0) {
-			return row+1;
-		} else {
-			return ((Object[])lights.get(row+1))[col+1];
+	
+	public Object getValueAt(int row, int col) {
+		switch (col) {
+		case 1:
+			return (dlg.mark.getColour(Ent.LIGHT, row));
+		case 2:
+			return (dlg.mark.getLightChar(row));
+		case 3:
+			return (dlg.mark.getLightGroup(row));
+		case 4:
+			return (dlg.mark.getLightPeriod(row));
+		case 5:
+			return (dlg.mark.getLightHeight(row));
+		case 6:
+			return (dlg.mark.getLightRange(row));
+		case 7:
+			return (dlg.mark.getVisibility(row));
+		case 8:
+			return (dlg.mark.getLightSector1(row));
+		case 9:
+			return (dlg.mark.getLightSector2(row));
+		default:
+			return null;
 		}
 	}
 
-	private boolean isCellEditable(int row, int col) {
-		return (col > 0);
+	public void setValueAt(Object value, int row, int col) {
+		switch (col) {
+		case 1:
+			dlg.mark.setColour(Ent.LIGHT, row, (SeaMark.Col)value);
+		case 2:
+			dlg.mark.setLightChar(row, (SeaMark.Chr)value);
+		case 7:
+			dlg.mark.setVisibility(row, (SeaMark.Vis)value);
+		default:
+			dlg.mark.setLightSector2(row, (String)value);
+		}
 	}
-
-	private void setValueAt(Object value, int row, int col) {
-		((Object[])lights.get(row+1))[col+1] = value;
-	}
-	
 }
+	/*
+	 * panel = new JPanel();
+	 * this.setSize(700, 100);
+	 * panel.setBounds(0, 0, 700, 512);
+	 * this.getContentPane().add(panel);
+	 * table = new JTable();
+	 * tablePane = new JScrollPane(table);
+	 * tablePane.setBounds(40, 0, 660, 34);
+	 * panel.setLayout(null);
+	 * panel.add(tablePane);
+	 * 
+	 * alMinusButton = new ActionListener() {
+	 *  public void actionPerformed(java.awt.event.ActionEvent e) { deleteSector(2); } };
+	 * minusButton = new JButton(new
+	 * ImageIcon(getClass().getResource("/images/MinusButton.png")));
+	 * minusButton.setBounds(0, 0, 32, 34);
+	 * minusButton.addActionListener(alMinusButton); panel.add(minusButton);
+	 * 
+	 * alPlusButton = new ActionListener() { public void
+	 * actionPerformed(java.awt.event.ActionEvent e) { addSector(2); } };
+	 * plusButton = new JButton(new
+	 * ImageIcon(getClass().getResource("/images/PlusButton.png")));
+	 * plusButton.setBounds(0, 34, 32, 34);
+	 * plusButton.addActionListener(alPlusButton); panel.add(plusButton); }
+	 * 
+	 * public int getSectorCount() { return getRowCount(); }
+	 * 
+	 * public void addSector(int idx) { lights.add(idx, new Object[]{null, null,
+	 * null, null, null, null, null, null, null, null, null, null});
+	 * tablePane.setSize(660, ((getRowCount() * 16) + 18)); if (getRowCount() > 3)
+	 * { this.setSize(700, ((getRowCount() * 16) + 40)); } else {
+	 * this.setSize(700, 100); } // light.fireTableRowsInserted(idx, idx); }
+	 * 
+	 * public void deleteSector(int idx) { lights.remove(idx);
+	 * tablePane.setSize(660, ((getRowCount() * 16) + 18)); if (getRowCount() > 3)
+	 * { this.setSize(700, ((getRowCount() * 16) + 40)); } else {
+	 * this.setSize(700, 100); } // light.fireTableRowsDeleted(idx, idx); }
+	 * 
+	 * private ArrayList<Object[]> lights;
+	 * 
+	 */
+}
Index: /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
===================================================================
--- /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java	(revision 27016)
+++ /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java	(revision 27017)
@@ -31,7 +31,16 @@
 
 	public enum Reg {
-		A, B, C
-	}
-
+		A, B, C, R, X
+	}
+
+	public static final EnumMap<Reg, String> RegSTR = new EnumMap<Reg, String>(Reg.class);
+	static {
+		RegSTR.put(Reg.A, "iala-a");
+		RegSTR.put(Reg.B, "iala-b");
+		RegSTR.put(Reg.C, "cevni");
+		RegSTR.put(Reg.R, "riwr");
+		RegSTR.put(Reg.X, "other");
+	}
+	
 	private Reg region = Reg.A;
 
@@ -317,4 +326,8 @@
 	private ArrayList<Col> topColour = new ArrayList<Col>();
 	private ArrayList<Col> lightColour = new ArrayList<Col>();
+	
+	public int getSectorCount() {
+		return lightColour.size();
+	}
 
 	public Col getColour(Ent ent, int i) {
@@ -773,12 +786,12 @@
 	}
 	
-	private Vis lightVisibility = Vis.UNKNOWN;
+	private ArrayList<Vis> lightVisibility = new ArrayList<Vis>();
 	
-	public Vis getLightVisibility() {
-		return lightVisibility;
-	}
-
-	public void setLightVisibility(Vis vis) {
-		lightVisibility = vis;
+	public Vis getVisibility(int i) {
+		return lightVisibility.get(i);
+	}
+
+	public void setVisibility(int i, Vis vis) {
+		lightVisibility.set(i, vis);
 	}
 	
@@ -794,11 +807,11 @@
 	
 	public enum Lit {
-		UNKNOWN, VERT, HORIZ, UPPER, LOWER, REAR, FRONT, AERO, AIROBS,
-		FOGDET, FLOOD, STRIP, SUBS, SPOT, MOIRE, EMERG, BEAR
-	}
-
-	public static final Map<EnumSet<Lit>, String> LitMAP = new HashMap<EnumSet<Lit>, String>();
+		UNKNOWN, VERT, HORIZ, DIR, UPPER, LOWER, LEAD, REAR, FRONT,
+		AERO, AIROBS, FOGDET, FLOOD, STRIP, SUBS, SPOT, MOIRE, EMERG, BEAR
+	}
+
+	public static final Map<EnumSet<Lit>, String> LitSTR = new HashMap<EnumSet<Lit>, String>();
 	static {
-		LitMAP.put(EnumSet.of(Lit.UNKNOWN), "");
+		LitSTR.put(EnumSet.of(Lit.VERT), "vertical");
 	}
 
@@ -1218,4 +1231,5 @@
 
 	public boolean isValid() {
+		dlg.manager.showVisualMessage("");
 		switch (getObject()) {
 		case BCNCAR:
@@ -1253,6 +1267,8 @@
 			return true;
 		default:
+			dlg.manager.showVisualMessage("Seamark not recognised");
 			return false;
 		}
+		dlg.manager.showVisualMessage("Seamark not recognised");
 		return false;
 	}
