--- FM2SQL/Attic/FM2SQL.java 2004/10/19 11:12:19 1.43 +++ FM2SQL/Attic/FM2SQL.java 2004/11/18 11:17:42 1.46 @@ -64,6 +64,7 @@ import javax.swing.JTextArea; import javax.swing.JTextField; import javax.swing.KeyStroke; import javax.swing.ListSelectionModel; +import javax.swing.SwingConstants; import javax.swing.event.TableModelEvent; import javax.swing.event.TableModelListener; import javax.swing.table.TableModel; @@ -1098,6 +1099,11 @@ public class FM2SQL extends JFrame imple { deleteItem.doClick(); } + else if (database.mode == Convert.DataBase.SYNCHRONIZE_MODE) + { + synchronizeItem.doClick(); + } + delimiter = database.delimiter; database.bean.getConnection(); @@ -1369,7 +1375,7 @@ public class FM2SQL extends JFrame imple // System.out.println("Update done"); //if (e.getType() == e.DELETE) // System.out.println("Delete done"); - if (e.getType() == e.UPDATE && !noDBUpdate) + if (e.getType() == TableModelEvent.UPDATE && !noDBUpdate) { int row = e.getFirstRow(), col = e.getColumn(); System.out.println("Got in " + row + " " + col); @@ -1624,7 +1630,7 @@ public class FM2SQL extends JFrame imple //content.setBorder(BorderFactory.createRaisedBevelBorder()); content.setLayout(new BoxLayout(content, BoxLayout.Y_AXIS)); title = new JLabel("Progress of conversion"); - title.setHorizontalTextPosition(title.CENTER); + title.setHorizontalTextPosition(SwingConstants.CENTER); titlePanel.add(title); buttonPanel.add(cancel); // content.add(titlePanel); @@ -1718,7 +1724,7 @@ public class FM2SQL extends JFrame imple delimiter.addActionListener(al); content.setLayout(new BoxLayout(content, BoxLayout.Y_AXIS)); title = new JLabel("Enter Delimiter "); - title.setHorizontalTextPosition(title.CENTER); + title.setHorizontalTextPosition(SwingConstants.CENTER); titlePanel.add(title); buttonPanel.add(ok); buttonPanel.add(cancel); @@ -1837,7 +1843,7 @@ public class FM2SQL extends JFrame imple passwd.addActionListener(al); content.setLayout(new BoxLayout(content, BoxLayout.Y_AXIS)); title = new JLabel("Enter user and password "); - title.setHorizontalTextPosition(title.CENTER); + title.setHorizontalTextPosition(SwingConstants.CENTER); titlePanel.add(title); buttonPanel.add(ok); buttonPanel.add(cancel); @@ -1908,6 +1914,11 @@ public class FM2SQL extends JFrame imple { layouts = new Vector(); } + catch (Exception e) + { + // TODO Auto-generated catch block + e.printStackTrace(); + } idVec = bean.getColumnNames(); if (idVec == null) @@ -1991,7 +2002,7 @@ public class FM2SQL extends JFrame imple destURLBox.setEnabled(state); } - public TableComponent.SQLCommand createStatement(String table, DBBean beanDest, String layout, String query) throws SQLException, ParseException + public TableComponent.SQLCommand createStatement(String table, DBBean beanDest, String layout, String query) throws SQLException, ParseException, Exception { fmInstance.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));