Compiled for me after commenting all references to GenSequencesGui. How about giving the line number that the compiler gave to you.
wasif akbar
Greenhorn
Joined: May 02, 2001
Posts: 11
posted
0
Originally posted by Paul Stevens: Compiled for me after commenting all references to GenSequencesGui. How about giving the line number that the compiler gave to you.
Paul, Thanks for your quick response, I do appreciate it. Unfortunatelyrocco_46902@yahoo.com, Forte did not report the line number. Below is the actual errors: C:\forte4j\com\teoco\GenSequences\NewExceptions.java: Invalid use of "this" selector syntax C:\forte4j\com\teoco\GenSequences\NewExceptions.java: Invalid use of "this" selector syntax C:\forte4j\com\teoco\GenSequences\NewExceptions.java: Invalid use of "this" selector syntax C:\forte4j\com\teoco\GenSequences\NewExceptions.java: Invalid use of "this" selector syntax Note: C:\forte4j\com\teoco\GenSequences\NewExceptions.java uses a deprecated API. Recompile with "-deprecation" for details. 4 errors So here are a couple of the associated files. Maybe they will help in diagnosing the problem. Thanks again. package com.teoco.GenSequences; import java.io.File; import java.awt.*; import java.awt.TextField; import java.awt.event.*; import javax.swing.*; import java.io.FileFilter; import java.sql.*; import java.util.Enumeration; import com.teoco.GenSequences.*; import com.teoco.Utilities.XmlInterface; import java.util.Vector; import java.util.Hashtable; import org.xml.sax.AttributeList;
public class GenSequencesGui extends Frame implements ActionListener { public GenSequencesGui() { //setIconImage(Toolkit.getDefaultToolkit().getImage("images/eplogo.gif")); setTitle("GenSequences"); setLayout(new BorderLayout(0, 25)); setSize(500, 375); setBackground(Color.lightGray); addWindowListener(new WindowDestroyer());
Label northLabel = new Label(); add("North", northLabel); Label eastLabel = new Label(); add("East", eastLabel); Label westLabel = new Label(); add("West", westLabel);
Panel centerPanel = new Panel(new GridLayout(7, 2, 10, 10)); add("Center", centerPanel); Label dbInstance = new Label("Database Instance"); centerPanel.add(dbInstance); instance = new TextField(); centerPanel.add(instance); Label dbHost = new Label("Database Host"); centerPanel.add(dbHost); host = new TextField(); centerPanel.add(host); Label dbPort = new Label("Port Number"); centerPanel.add(dbPort); port = new TextField("1521"); centerPanel.add(port); Label dbUsername = new Label("Username"); centerPanel.add(dbUsername); username = new TextField(); centerPanel.add(username); Label dbPassword = new Label("Password"); centerPanel.add(dbPassword); password = new TextField(); centerPanel.add(password); password.setEchoChar('*'); Label dbConfirmPassword = new Label("Confirm Password"); centerPanel.add(dbConfirmPassword); confirmPassword = new TextField(); centerPanel.add(confirmPassword); confirmPassword.setEchoChar('*');
Panel southPanel = new Panel(new BorderLayout()); add("South", southPanel); TextField sField = new TextField();// This is the status bar field. sField.setEditable(false); southPanel.add("South", sField); Label eLabel = new Label(); southPanel.add("East", eLabel); Label wLabel = new Label(); southPanel.add("West", wLabel);
Panel sPanel = new Panel(new BorderLayout()); southPanel.add("North", sPanel); Label sPanelELabel = new Label(); sPanel.add("East", sPanelELabel); Label sPanelWLabel = new Label(); sPanel.add("West", sPanelWLabel); Panel lastPanel = new Panel(new GridLayout(1, 3, 30, 0)); sPanel.add("Center", lastPanel); Button genSeq = new Button("Generate Sequences"); lastPanel.add(genSeq); genSeq.addActionListener(this); Button testDBConn = new Button("Test Connection"); lastPanel.add(testDBConn); testDBConn.addActionListener(this); Button clearFields = new Button("Clear Fields"); lastPanel.add(clearFields); clearFields.addActionListener(this);
Menu fileMenu = new Menu("File"); MenuItem gs = new MenuItem("Generate Sequences"); gs.addActionListener(this); fileMenu.add(gs); MenuItem tc = new MenuItem("Test Connection"); tc.addActionListener(this); fileMenu.add(tc); MenuItem cf = new MenuItem("Clear Fields"); cf.addActionListener(this); fileMenu.add(cf); MenuItem cs = new MenuItem("Check Sequences"); cs.addActionListener(this); fileMenu.add(cs); MenuItem exit = new MenuItem("Exit"); exit.addActionListener(this); fileMenu.add(exit);
Menu viewMenu = new Menu("View"); MenuItem vl = new MenuItem("View Log"); vl.addActionListener(this); viewMenu.add(vl); MenuItem r = new MenuItem("Refresh"); r.addActionListener(this); viewMenu.add(r); MenuItem ed = new MenuItem("Exceptions Editor"); ed.addActionListener(this); viewMenu.add(ed);
MenuBar mBar = new MenuBar(); mBar.add(fileMenu); mBar.add(viewMenu); setMenuBar(mBar); }
public class PropertyEntry { PropertyEntry(String tblName, String tblField) { myExceptionTableName = tblName; myExceptionTableField = tblField; } String getExceptionTableName() {return myExceptionTableName;}
public void load() { XmlInterface xml = new XmlInterface(); try { xml.getAttributes(myExceptionsFile, new XmlHandler()); // Getting attributes of exceptions xml file. } catch(Exception ex) { String errorText = "Error parsing the exceptions file"; ErrorDialog fileCreateDialog = new ErrorDialog(new GenSequencesGui(), errorText, true); } }
private class XmlHandler implements XmlInterface.XmlAttributeHandler { // This method is called for every element name. public void startElement(String name, AttributeList attrs) { Vector properties; Vector temp; if (name.equalsIgnoreCase("SEQUENCE")) { properties = new Vector(); seqName = attrs.getValue("name"); myExceptionsHash.put(seqName, properties); } if (name.equalsIgnoreCase("TABLE")) { temp = (Vector)myExceptionsHash.get(seqName); PropertyEntry entry = new PropertyEntry(attrs.getValue("tbl_name"), attrs.getValue("fld_name")); temp.add(entry); } } } public static void main(String[] args) { GenSequencesGui myGui = new GenSequencesGui(); myGui.setVisible(true); }
public void actionPerformed(ActionEvent e) { String actionCommand = e.getActionCommand(); if(actionCommand.equals("Exceptions Editor")) { load(); ExceptionDialog ed = new ExceptionDialog(this, myExceptionsHash); ed.setVisible(true); }
public TextField instance; public TextField host; public TextField port; public TextField username; public TextField password; public TextField confirmPassword; public Hashtable myExceptionsHash = new Hashtable(); public String seqName; public File myExceptionsFile = new File("com\\teoco\\GenSequences\\Exceptions.xml"); public Vector mySequenceNames = new Vector();