If YOU think your good at programming enter here!!!

For those of you who just helped me thanks a lot.
Another problem, i have coded the system using java ontop of an Oracle DB. In several of my forms I have a delete button which I want to give some functionality to as it has none at the moment. The functionality I want is to be able press this delete button and for it to delete the current showing record in the DB.
For example if i was looking at a customer in the customer form and pressed the delete button I would like it to delete that customer from the DB. Look at my code so far BELOW to see if you can give me any tips on what the code should look like.
10 dukes for whoever gives me a solution that works so all you programming guru's get your thinking hats on and answer this little baby!!!
CUSTOMER CLASS
import java.util.*;
import java.sql.*;
public class Customer{
     private int customer_id;
     private String customer_name;
     private String address1;
     private String address2;
     private String town;
     private String county;
     private String post_code;
     private String country;
     private String fax;
     private String telephone;
     private String contact_name;
     private String email;
     private boolean newCustomer;
     //private JobList jobList;
     public Customer(int c){
          customer_id = c;
          newCustomer = true;
     public Customer(int inCustomer_id,String inCustomer_name,String inAddress1, String inAddress2, String inTown, String inCounty,String inPost_code,String inCountry,String inFax,String inTelephone,String inContact_name,String inEmail){
          customer_id=inCustomer_id;
          customer_name=inCustomer_name;
          address1=inAddress1;
          address2=inAddress2;
          town=inTown;
          county=inCounty;
          post_code=inPost_code;
          country=inCountry;
          fax=inFax;
          telephone=inTelephone;          
          contact_name=inContact_name;
          email=inEmail;
          newCustomer = false;
     public String getAddress1(){
          if (address1 == null)
               return ("");
          else
               return address1;
     public String getAddress2(){
          if (address2 == null)
               return ("");
          else
               return address2;
     public String getCounty(){
          if (county == null)
               return ("");
          else
               return county;
     public String getFax(){
          if (fax == null)
               return ("");
          else
               return fax;
     public int getCustomer_id(){
          if (customer_id == 0)
               return (0);
          else
               return customer_id;
     public String getCustomer_name(){
          if (customer_name == null)
               return ("");
          else
               return customer_name;
     public String getTelephone(){
          if (telephone == null)
               return ("");
          else
               return telephone;
     public String getPost_code(){
          if (post_code == null)
               return ("");
          else
               return post_code;
     public String getTown(){
          if (town == null)
               return ("");
          else
               return town;
     public String getCountry(){
          if (country == null)
               return ("");
          else
               return country;
     public String getContact_name(){
          if (contact_name == null)
               return ("");
          else
               return contact_name;
     public String getEmail(){
          if (email == null)
               return ("");
          else
               return email;
     /*public JobList getJobList() throws SQLException {
          // if the joblist object exists return it otherwise create it
          if (jobList != null){
               return jobList;
          else{
               return new JobList(this);
     public boolean isNewCustomer(){
          return newCustomer;
     public void setAddress1(String inAddress1){
          address1=inAddress1;
     public void setAddress2(String inAddress2){
          address2=inAddress2;
     public void setCounty(String inCounty){
          county=inCounty;
     public void setFax(String inFax){
          fax=inFax;
     public void setCustomer_id(int inCustomer_id){
          customer_id = inCustomer_id;
     public void setCustomer_name(String inCustomer_name){
          customer_name=inCustomer_name;
     public void setTelephone(String inTelephone){
          telephone=inTelephone;
     public void setPost_code(String inPost_code){
          post_code=inPost_code;
     public void setTown(String inTown){
          town=inTown;
     public void setCountry(String inCountry){
          country=inCountry;
     public void setContact_name(String inContact_name){
          contact_name=inContact_name;
     public void setEmail(String inEmail){
          email=inEmail;
CUSTOMERLIST CLASS
import java.sql.*;
import java.util.*;
public class CustomerList{
     private ResultSet rs ;
     private Connection con;
     private Statement stmt;
     public CustomerList () {
          ConnectionManager man = ConnectionManager.getInstance();
          con = man.getConnection();
     public Customer getFirstCustomer()throws SQLException     {
          Customer firstCustomer;
          stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
          rs = stmt.executeQuery("select customer_id,customer_name,address1,address2,town,county,post_code,country,fax,telephone,contact_name,email from customer");
          rs.next();
          firstCustomer = loadCustomer();
          return firstCustomer;
     public Customer getLastCustomer() throws SQLException{
          Customer lastCustomer;
          rs.last();
          lastCustomer = loadCustomer();
          return lastCustomer;
     public Customer getNextCustomer()throws SQLException{
          Customer nextCustomer ;
          if (rs.next()){
               nextCustomer = loadCustomer();
          else{
               nextCustomer = null;
          return nextCustomer;
     public Customer getPreviousCustomer()throws SQLException{
          Customer previousCustomer;
          if (rs.previous()){
               previousCustomer = loadCustomer();
          else
               previousCustomer = null;
          return previousCustomer;
     public Customer findCustomer(int inCustNum) throws SQLException{
          Customer foundCust;
          if (inCustNum==0){
               foundCust = getFirstCustomer();
          else{
               stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
               rs = stmt.executeQuery("select customer_id,customer_name,address1,address2,town,county,post_code,country,fax,telephone,contact_name,email from customer where customer_id = "+inCustNum);
               if (rs.next()){
                    foundCust = loadCustomer();
               else
                    foundCust = null;
          return foundCust;
     public Customer addCust()throws SQLException{
          Statement stmt2 = con.createStatement();
          ResultSet rsadd = stmt2.executeQuery("select custid.nextval from dual");
          rsadd.next();
          int id = rsadd.getInt("nextval");
          rsadd.close();
          stmt2.close();
          Customer newCust = new Customer(id);
          return newCust;
     public Customer saveCustomer(Customer inSaveCust)throws SQLException{
          Statement stmt3 = con.createStatement();
          int rowNum;
          //int incid = inSaveCust.getCid();
          if (inSaveCust.isNewCustomer()){
               stmt3.executeUpdate("insert into customer values ("
               +inSaveCust.getCustomer_id()
               +",'"+inSaveCust.getCustomer_name()
               +"','"+inSaveCust.getAddress1()
               +"','"+inSaveCust.getAddress2()
               +"','"+ inSaveCust.getTown()
               +"','"+ inSaveCust.getCounty()
               +"','"+inSaveCust.getPost_code()
               +"','"+inSaveCust.getCountry()
               +"','"+inSaveCust.getFax()
               +"','"+ inSaveCust.getTelephone()
               +"','"+inSaveCust.getContact_name()
               +"','"+inSaveCust.getEmail()+"')");
               inSaveCust = getFirstCustomer();//refreshes list after insert
               inSaveCust = getLastCustomer();// goes to the inserted record ie last one
          else {
               rowNum = rs.getRow();//traps the record number so can be returned to
               stmt3.executeUpdate("update customer set customer_name = '"+inSaveCust.getCustomer_name()
               + "', address1 = '"+inSaveCust.getAddress1()
               + "', address2 = '"+inSaveCust.getAddress2()
               + "', town = '"+ inSaveCust.getTown()
               + "', county = '"+ inSaveCust.getCounty()
               + "', post_code = '"+inSaveCust.getPost_code()
               + "', telephone = '"+inSaveCust.getCountry()
               + "', fax = '"+inSaveCust.getFax()
               + "', country = '"+inSaveCust.getTelephone()
               + "', contact_name = '"+inSaveCust.getContact_name()
               + "', email = '"+inSaveCust.getEmail()
               +"' where customer_id = "+inSaveCust.getCustomer_id());
               inSaveCust = getFirstCustomer();
               rs.absolute(rowNum); // points back to same record number as updated
               inSaveCust = loadCustomer();
          con.commit();
          return inSaveCust;
     public boolean isFirst() throws SQLException{
          return rs.isFirst();
     public boolean isLast() throws SQLException{
          return rs.isLast();
     public Customer loadCustomer ()throws SQLException{
          Customer cust = new Customer(rs.getInt("customer_id"),rs.getString("customer_name"),rs.getString("address1"),
                         rs.getString("address2"),rs.getString("town"),rs.getString("county"),
                         rs.getString("post_code"),rs.getString("country"),rs.getString("fax"),
                         rs.getString("telephone"),rs.getString("contact_name"),rs.getString("email"));
          return cust;
CUSTOMERFORM CLASS
import javax.swing.*;
import javax.swing.border.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import java.util.*;
public class CustomerForm extends JFrame implements ActionListener {
private Customer currentCustomer;
private CustomerList inCustomerList;
private JPanel panel;
private JTextField textCustomer_id,textCustomer_name,textAddress1,textAddress2,textTown,
     textCounty,textPost_code,textCountry,textTelephone,textFax,textContact_name,textEmail,textFind;
private JButton nextCust, prevCust,firstCust,lastCust,newCust,
     findCust,add,save,delete,jobs,close;
     public CustomerForm(CustomerList inC)throws SQLException{
          inCustomerList = inC;
          currentCustomer = inCustomerList.getFirstCustomer();
          displayForm();
          displayFields();
          setTextFields();
          displayButtons();
          getContentPane().add(panel);
          setVisible(true);
     public void displayForm() throws SQLException{
          setTitle("Customer Form");
          setSize(700,500);
          // Center the frame
          Dimension dim = getToolkit().getScreenSize();
          setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
          getContentPane().setLayout(new BorderLayout());
          Border etched = BorderFactory.createEtchedBorder();
          panel = new JPanel();
          panel.setLayout( null );
          Border paneltitled = BorderFactory.createTitledBorder(etched,"");
          panel.setBorder(paneltitled);
     public void displayFields() throws SQLException{
          int x = 10;
          int y = 50;
          int textheight = 20;
          int textwidth = 150;
          int labelwidth = 110;
          int ydist = textheight + 10;
          int xdist = textwidth*2;
          JLabel labelCustomer_id = new JLabel("Customer Number:");
          labelCustomer_id.setBounds( x, y, labelwidth, textheight);
          panel.add(labelCustomer_id);
          JLabel labelCustomer_name = new JLabel("Customer Name:");
          labelCustomer_name.setBounds(xdist, y, labelwidth, textheight);
          panel.add(labelCustomer_name);
          JLabel labelAddress1 = new JLabel("Address 1:");
          labelAddress1.setBounds( x, y+ydist, labelwidth, textheight);
          panel.add(labelAddress1);
          JLabel labelAddress2 = new JLabel("Address 2:");
          labelAddress2.setBounds( xdist, y+ydist, labelwidth, textheight);
          panel.add(labelAddress2);
          JLabel labelTown = new JLabel("Town:");
          labelTown.setBounds(x, y+ydist*2, labelwidth, textheight);
          panel.add(labelTown);
          JLabel labelCounty = new JLabel("County:");
          labelCounty.setBounds(xdist, y+ydist*2, labelwidth, textheight);
          panel.add(labelCounty);
          JLabel labelPost_code = new JLabel("Post Code:");
          labelPost_code.setBounds(x, y+ydist*3, labelwidth, textheight);
          panel.add(labelPost_code);
          JLabel labelCountry = new JLabel("Country:");
          labelCountry.setBounds(xdist, y+ydist*3, labelwidth, textheight);
          panel.add(labelCountry);
          JLabel labelTelephone = new JLabel("Phone:");
          labelTelephone.setBounds(x, y+ydist*4, labelwidth, textheight);
          panel.add(labelTelephone);
          JLabel labelFax = new JLabel("Fax:");
          labelFax.setBounds(xdist, y+ydist*4, labelwidth, textheight);
          panel.add(labelFax);
          JLabel labelContact_name = new JLabel("Contact Name:");
          labelContact_name.setBounds(x, y+ydist*5, labelwidth, textheight);
          panel.add(labelContact_name);
          JLabel labelEmail = new JLabel("E-mail address:");
          labelEmail.setBounds(xdist, y+ydist*5, labelwidth, textheight);
          panel.add(labelEmail);
          JLabel labelFind = new JLabel("Customer Number Search:");
          labelFind.setBounds( 40, 360, 200, textheight);
          panel.add(labelFind);
          textAddress1 = new JTextField();
          textAddress1.setBounds(x+labelwidth, y+ydist, textwidth, textheight);
          panel.add(textAddress1);
          textAddress2 = new JTextField();
          textAddress2.setBounds(xdist+labelwidth, y+ydist, textwidth, textheight);
          panel.add(textAddress2);
          textTown = new JTextField();
          textTown.setBounds(x+labelwidth, y+ydist*2, textwidth, textheight);
          panel.add(textTown);
          textCounty = new JTextField();
          textCounty.setBounds(xdist+labelwidth, y+ydist*2, textwidth, textheight);
          panel.add(textCounty);
          textPost_code = new JTextField();
          textPost_code.setBounds(x+labelwidth, y+ydist*3, textwidth, textheight);
          panel.add(textPost_code);
          textCountry = new JTextField();
          textCountry.setBounds(xdist+labelwidth, y+ydist*3, textwidth, textheight);
          panel.add(textCountry);
          textTelephone = new JTextField();
          textTelephone.setBounds(x+labelwidth, y+ydist*4, textwidth, textheight);
          panel.add(textTelephone);
          textFax = new JTextField();
          textFax.setBounds(xdist+labelwidth, y+ydist*4, textwidth, textheight);
          panel.add(textFax);
          textContact_name = new JTextField();
          textContact_name.setBounds(x+labelwidth, y+ydist*5, textwidth, textheight);
          panel.add(textContact_name);
          textEmail = new JTextField();
          textEmail.setBounds(xdist+labelwidth, y+ydist*5, textwidth+50, textheight);
          panel.add(textEmail);
          textFind = new JTextField();
          textFind.setBounds(200, 360, 80, textheight);
          panel.add(textFind);
          textCustomer_id = new JTextField();
          textCustomer_id.setBounds(x+labelwidth, y, textwidth, textheight);
          panel.add(textCustomer_id);
          textCustomer_name = new JTextField();
          textCustomer_name.setBounds(xdist+labelwidth, y, textwidth+50, textheight);
          panel.add(textCustomer_name);
          public boolean delete() {
          textCustomer_id.setText("");
          textCustomer_name.setText("");
          textAddress1.setText("");
          textAddress2.setText("");
          textTown.setText("");
          textCounty.setText("");
          textPost_code.setText("");
          textCountry.setText("");
          textTelephone.setText("");
          textFax.setText("");
          textContact_name.setText("");
          textEmail.setText("");
          textFind.setText("");
          return true;
     public void displayButtons(){
          firstCust= new JButton("FIRST");
          firstCust.addActionListener(this);
          firstCust.setBounds(50, 430, 100, 20 );
          panel.add( firstCust );
          nextCust = new JButton("NEXT");
          nextCust.addActionListener(this);
          nextCust.setBounds(150, 430, 100, 20 );
          panel.add( nextCust );
          prevCust = new JButton("PREVIOUS");
          prevCust.addActionListener(this);
          prevCust.setBounds(250, 430, 100, 20 );
          panel.add( prevCust );
          lastCust= new JButton("LAST");
          lastCust.addActionListener(this);
          lastCust.setBounds(350, 430, 100, 20 );
          panel.add( lastCust );
          findCust= new JButton("FIND");
          findCust.addActionListener(this);
          findCust.setBounds(350, 360, 100, 20 );
          panel.add( findCust );
          add = new JButton("ADD");
          add.addActionListener(this);
          add.setBounds(150, 400, 100, 20 );
          panel.add( add );
          save = new JButton("SAVE");
          save.addActionListener(this);
          save.setBounds(250, 400, 100, 20 );
          panel.add( save );
          jobs = new JButton("JOBS");
          jobs.addActionListener(this);
          jobs.setBounds(550, 360, 100, 20 );
          panel.add( jobs );
          close = new JButton("CLOSE");
          close.addActionListener(this);
          close.setBounds(550, 430, 100, 20 );
          panel.add( close );
          delete = new JButton("DELETE");
          delete.addActionListener(this);
          delete.setBounds(350, 400, 100, 20 );
          panel.add( delete );
     public void getTextFields(){
          currentCustomer.setCustomer_id(Integer.parseInt(textCustomer_id.getText()));
          currentCustomer.setCustomer_name(textCustomer_name.getText());
          currentCustomer.setAddress1(textAddress1.getText());
          currentCustomer.setAddress2(textAddress2.getText());
          currentCustomer.setTown(textTown.getText());
          currentCustomer.setCounty(textCounty.getText());
          currentCustomer.setPost_code(textPost_code.getText());
          currentCustomer.setCountry(textCountry.getText());
          currentCustomer.setFax(textFax.getText());
          currentCustomer.setTelephone(textTelephone.getText());
          currentCustomer.setContact_name(textContact_name.getText());
          currentCustomer.setEmail(textEmail.getText());
     public void setTextFields() throws SQLException{
          textCustomer_id.setText(String.valueOf(currentCustomer.getCustomer_id()));
          textCustomer_id.setEditable(false);
          textCustomer_name.setText(currentCustomer.getCustomer_name());
          textAddress1.setText(currentCustomer.getAddress1());
          textAddress2.setText(currentCustomer.getAddress2());
          textTown.setText(currentCustomer.getTown());
          textCounty.setText(currentCustomer.getCounty());
          textPost_code.setText(currentCustomer.getPost_code());
          textCountry.setText(currentCustomer.getCountry());
          textFax.setText(currentCustomer.getFax());
          textTelephone.setText(currentCustomer.getTelephone());
          textContact_name.setText(currentCustomer.getContact_name());
          textEmail.setText(currentCustomer.getEmail());
     public void actionPerformed(ActionEvent e) {
     Object source = e.getSource();
     try {
     if (source == nextCust)
     currentCustomer = inCustomerList.getNextCustomer();
     else if (source == prevCust)
     currentCustomer = inCustomerList.getPreviousCustomer();
     else if (source == findCust) {
     try {
     currentCustomer =
     inCustomerList.findCustomer(Integer.parseInt(textFind.getText()));
     catch (NumberFormatException ex) {
     JOptionPane.showMessageDialog(
     null, "Invalid Customer number", "ERROR",
     JOptionPane.ERROR_MESSAGE);
     if (currentCustomer == null) {
     JOptionPane.showMessageDialog(null, "Customer not found");
     currentCustomer = inCustomerList.getFirstCustomer();
     textFind.setText(null);
     else if (source == firstCust)
     currentCustomer = inCustomerList.getFirstCustomer();
     else if (source == lastCust)
     currentCustomer = inCustomerList.getLastCustomer();
     else if (source == add) {
     currentCustomer = inCustomerList.addCust();
     add.setEnabled(false);
     else if (source == delete) {
                    delete();
     else if (source == save) {
     add.setEnabled(true);
     getTextFields();
     currentCustomer = inCustomerList.saveCustomer(currentCustomer);
     //else if (source == jobs) {
     // JFrame newJobForm = new JobForm(currentCustomer.getJobList());
     //else if (source == delete) {
               //          setTextFields == null;
     else if (source == close) {
     dispose();
     setTextFields();
     nextCust.setEnabled(!inCustomerList.isLast());
     prevCust.setEnabled(!inCustomerList.isFirst());
     firstCust.setEnabled(!inCustomerList.isFirst());
     lastCust.setEnabled(!inCustomerList.isLast());
     catch (SQLException ex) {
     System.out.println("Failed");
     System.out.println(ex.getMessage());
     ex.printStackTrace();
     System.exit(-1);
THANKS A LOT TO WHO EVER THINKS THEY CAN DO THIS!!!

Hi Pcrighton:
Is this a trick question?
If you already knew how to trap the delete button, why can't you find out the record associated with the current customer and use Oracle SQL DELETE to delete that record from the table (assuming that user has permission to delete records from the database).
I don't have Oracle on my PC (have Oracle 7 on my RS/6000 but it's not hooked up to the network, also Java wasn't installed on that machine) so I can't show you anything.
V.V.

Similar Messages

  • If you think you are a good programmer then enter here!!!

    I have coded a password screen and have 2 text fields for the user to enter obviously their username and password. However when entering a password you should never be able to see what you are writing it should be in the form of stars or something so your password stays confidential.
    So if your a programming guru and think you can do this then please give me the code which allows the user to enter their password but appears as stars and not letters.
    This is the current password screen code:
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    public class Password extends JFrame implements ActionListener{
         private JPanel panel, panel2;
         private JLabel label1, label2;
         private JTextField text1, text2;
         private JButton exit, login;
         private ImageIcon picture;
         public Password(){
              displayForm();
              displayFields();
              displayButtons();
              getContentPane().add(panel,"Center");
              getContentPane().add(panel2,"North");
              setVisible(true);
              int x = 20;
              int y = 50;
              int textheight = 20;
              int textwidth = 150;
              int labelwidth = 100;
              int xdist = textwidth*2;
              int ydist = textheight + 10;
         public void displayForm(){
              setTitle("IS Ltd Login Screen");
              setSize(320,450);
              //Center the frame
              Dimension dim = getToolkit().getScreenSize();
              setLocation(dim.width/2-getWidth()/2, dim.height/2-getHeight()/2);
              getContentPane().setLayout(new BorderLayout());
              Border etched = BorderFactory.createEtchedBorder();
              panel = new JPanel();
              panel.setLayout( null );
              panel2 = new JPanel();
              panel2.setLayout( new FlowLayout() );
              Border paneltitled = BorderFactory.createTitledBorder(etched,"");
    //          panel.setBorder(paneltitled);
         public void displayFields(){
              int x = 20;
              int y = 50;
              int textheight = 20;
              int textwidth = 150;
              int labelwidth = 100;
              int xdist = textwidth*2;
              int ydist = textheight + 10;
              picture = new ImageIcon("logo.jpg");
              JLabel picLabel = new JLabel(picture);
              panel2.add(picLabel);
              label1 = new JLabel("User Name:");
              label1.setBounds(x, y, labelwidth, textheight);
              panel.add(label1);
              text1 = new JTextField("");
              text1.setBounds(x+labelwidth, y, textwidth, textheight);
              panel.add(text1);
              label2 = new JLabel("Password:");
              label2.setBounds(x, y + ydist, labelwidth, textheight);
              panel.add(label2);
              text2 = new JTextField("");
              text2.setBounds(x+labelwidth, y + ydist, textwidth, textheight);
              panel.add(text2);
         public void displayButtons(){
              exit= new JButton("EXIT");
              exit.addActionListener(this);
              exit.setBounds(20, 250, 70, 50 );
              panel.add( exit );
              login= new JButton("LOGIN");
              login.addActionListener(this);
              login.setBounds(220, 250, 70, 50 );
              panel.add( login );
         public void actionPerformed(ActionEvent e) {
              Object source = e.getSource();
              //try{
                   if (source == login){
                   JFrame myMenu = new SIMenu();
                   dispose();
                   else if (source == exit){
                        System.exit(0);
              /*catch (SQLException ex)     {
                   System.out.println("Failed");
                   System.out.println(ex.getMessage());
                   System.exit(-1);
         public static void main(String[] args) {
              Password frame = new Password();
              frame.addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
                        System.exit(0);
    }

    So its only change to the following code.
    import  javax.swing.*;
    import  javax.swing.border.*;
    import  java.awt.*;
    import  java.awt.event.*;
    import  java.sql.*;
    * put your documentation comment here
    public class Password extends JFrame
            implements ActionListener {
        private JPanel panel, panel2;
        private JLabel label1, label2;
        private JTextField text1;
        private JPasswordField text2;
        private JButton exit, login;
        private ImageIcon picture;
         * put your documentation comment here
        public Password () {
            displayForm();
            displayFields();
            displayButtons();
            getContentPane().add(panel, "Center");
            getContentPane().add(panel2, "North");
            setVisible(true);
            int x = 20;
            int y = 50;
            int textheight = 20;
            int textwidth = 150;
            int labelwidth = 100;
            int xdist = textwidth*2;
            int ydist = textheight + 10;
         * put your documentation comment here
        public void displayForm () {
            setTitle("IS Ltd Login Screen");
            setSize(320, 450);
            //Center the frame
            Dimension dim = getToolkit().getScreenSize();
            setLocation(dim.width/2 - getWidth()/2, dim.height/2 - getHeight()/2);
            getContentPane().setLayout(new BorderLayout());
            Border etched = BorderFactory.createEtchedBorder();
            panel = new JPanel();
            panel.setLayout(null);
            panel2 = new JPanel();
            panel2.setLayout(new FlowLayout());
            Border paneltitled = BorderFactory.createTitledBorder(etched, "");
            // panel.setBorder(paneltitled);
         * put your documentation comment here
        public void displayFields () {
            int x = 20;
            int y = 50;
            int textheight = 20;
            int textwidth = 150;
            int labelwidth = 100;
            int xdist = textwidth*2;
            int ydist = textheight + 10;
            picture = new ImageIcon("logo.jpg");
            JLabel picLabel = new JLabel(picture);
            panel2.add(picLabel);
            label1 = new JLabel("User Name:");
            label1.setBounds(x, y, labelwidth, textheight);
            panel.add(label1);
            text1 = new JTextField("");
            text1.setBounds(x + labelwidth, y, textwidth, textheight);
            panel.add(text1);
            label2 = new JLabel("Password:");
            label2.setBounds(x, y + ydist, labelwidth, textheight);
            panel.add(label2);
            text2 = new JPasswordField ("");
            text2.setBounds(x + labelwidth, y + ydist, textwidth, textheight);
            panel.add(text2);
         * put your documentation comment here
        public void displayButtons () {
            exit = new JButton("EXIT");
            exit.addActionListener(this);
            exit.setBounds(20, 250, 70, 50);
            panel.add(exit);
            login = new JButton("LOGIN");
            login.addActionListener(this);
            login.setBounds(220, 250, 70, 50);
            panel.add(login);
         * put your documentation comment here
         * @param e
        public void actionPerformed (ActionEvent e) {
            Object source = e.getSource();
            //try{
            if (source == login) {
                JFrame myMenu = new SIMenu();
                dispose();
            else if (source == exit) {
                System.exit(0);
            /*catch (SQLException ex) {
             System.out.println("Failed");
             System.out.println(ex.getMessage());
             System.exit(-1);
         * put your documentation comment here
         * @param args
        public static void main (String[] args) {
            Password frame = new Password();
            frame.addWindowListener(new WindowAdapter() {
                 * put your documentation comment here
                 * @param e
                public void windowClosing (WindowEvent e) {
                    System.exit(0);
    }good luck!

  • What do you think of this book: "Programming and Problem Solving with Java"

    Hello Everyone:
    This may be a strange post but I am wondering if anyone has read this book and what do you think of it?
    Book Information
    Title: Programming and Problem Solving with Java
    Authors: Neell Dale, Chip Weens, Mark Headington
    Publisher: Jones & Bartlett
    Thanks for any comments

    No believe me the book is bad! The only reason I asked is I am in a university class that uses those two books for there course. The author messed up on HelloWorld.java with 4 errors at compile time! How can anyone be that stupid since they are the ones who are supposed to be teaching me the fundamentals of Java. Anyhow I just wanted other people's thoughts about the books.
    Thanks again for your input.

  • How Secure Do You Think Your Info Is In iCloud??

    Would you just as soon store your information on your computer or someone else's? Another one of those security/pravacy  decisions.

    Personally, I don't think I would use iCloud or any other Cloud based service available (iCloud is definitely not the first and will not be the last) for any info that I would fear security issues with. Yes, I use the iCloud service but I don't depend on it any more than I depend on my computer to be my sole source for my data. I am that person that does not believe anything is 100% secure...not even the simple act of using your credit card to pay for an item in the store or writing a check to a company to pay a bill. If someone wants to access secure data bad enough they will find a way to do it...it has happened before. That's the price of all of our technological conveniences (shopping online, using CC's instead of cash, using services to secure our data...the list goes on). You just have to be smart about what you are willing to risk putting out there. If you fear it would harm you then you probably shouldn't use it...that includes what you physically do on your phone even without using the iCloud service.

  • Movie editing, what do you think is the best program?

    Free is better of course, as free beer at least.
    I have an idea for a fun movie, but I never tried anything about. I understood Windows' users tent to use `Moviemaker.' Is there something similar for Arch Linux?
    I just need to cut movie pieces and put them together and adding a new audio. It would be nice the possibility of speeding up or slowing down the movie.
    I am all ears, tell me!

    Mencoder provides many options for movie editing and codec transfers.
    Avidemux permits adding audio.  Jpeg, png images can be included in the video mix.
    Mencoder provides for joining .avi's.
    Mencoder provides means to edit the format of digital camera movies and stills to produce .avi movies. 
    Audacity can be used to modify sound.
    KolourPaint in kde permits changing resolution to make stills compatible with .avi movie format.  Other programs do the same.
    Best to you in making movies.

  • Blinking ?mark -- if you think your HD is dead, READ THIS

    I was sure my HD was dead. Blinking questionmark, couldn't recognize HD, FireWire Target Mode didn't work etc etc.
    Scanning through all the posts and found suggestion to repair HD with fsck.
    IT WORKED!!!
    Just wanted to share this link with anyone who might be helped...
    http://docs.info.apple.com/article.html?artnum=106214
    Resolve startup issues and perform disk maintenance with Disk Utility and fsck

    Hi Pcrighton:
    Is this a trick question?
    If you already knew how to trap the delete button, why can't you find out the record associated with the current customer and use Oracle SQL DELETE to delete that record from the table (assuming that user has permission to delete records from the database).
    I don't have Oracle on my PC (have Oracle 7 on my RS/6000 but it's not hooked up to the network, also Java wasn't installed on that machine) so I can't show you anything.
    V.V.

  • So You Think Your Computer's Not Powerful Enough For FCE/FCP !!!!!

    It's NOT a question - just some sobering thoughts!
    How many times do we get worried owners asking whether the Mac they have or the one they intend to get will have enough power to operate FCE/FCP?
    So I trawled through the history books - otherwise known as back-copies of Macworld and this is what I discovered.
    Final Cut Pro was released in April 1999. At that time the most powerful Macs had the following specification:-
    G3 450MHz processors.
    OS 8.6
    Couldn't find the HD size but guess it was around 20GB.
    All this power cost over £2,000 !
    Now I know that the latest versions of FCE/FCP have additional features, but if we disregard HD processing the latest are not that much different from the original.
    So has anyone, even those that buy the puniest Mac-Mini, got anything to really worry about?
    Ian.(Who sets cats amongst pigeons).

    I have a 1Ghz, G4 Powerbook w/768MB RAM and FCEHD runs beautifully. I also successfully use DVDSP2, Compressor, Cinema 4d 9.52, AE6.5Pro and RealFlow3. Motion 1 causes some crashes when I try to use particle effects and some AE based plug ins, but it does work for basic stuff.
    OK, bragging over

  • Hi, does anyone no a good invoice program?

    Hi
    Just started my own business, does anyone know a good invoice app to use on my mac.
    Cheers

    did you find a good invoice program?
    , because i to am looking. seems alot of them want you to pay a monthly fee?
    i would shell out to buy a good invioce app but i dont think i should have to pay a monthly fee.
    am i wrong and or does any one recemend a great invoiceing app

  • TS3510 how do you use your apple ID email with facetime on your laptop and your iphone?

    I am trying to set up my Facetime on my laptop and it's telling me that my email is already being used (from my iphone facetime). Can you use your Apple ID email AND iphone accounts in for both FaceTimes?

    That's normal. Just enter your password. You won't be able to change the Apple ID that appears there. After you sign out, and sign in with the new Apple ID, it will take the place of the old one.
    If you changed your Apple ID password, enter the new password.
    There are many iCloud services, and you might be confronted with the old Apple ID as you use them. You might have to sign out of each one individually, and sign in under your revised Apple ID.
    I agree it's confusing. It's even more confusing if you created more than one Apple ID. That's a different circumstance from changing an Apple ID. I hope you didn't do that.

  • HT4528 if someone locked you out of yo how do you unlock your phone?

    if someone locked you out of your iphone 4 and it says connect to itunes, how do you unlock your iphone?

    By entering the correct passcode or restoring to factory settings via recovery mode as shown in the article below:
    http://support.apple.com/kb/HT1808

  • Do you think FIOS is safe? It's NOT!!

    My FIOS connection is constantly being hacked. TV, Internet and Phone. Even wireless. Verizon cares to do nothing, even though the IP addresse are theirs.  If you're IP goes to gnilink.net, you have a problem!!
    They work with google who they will not even question if you think your intrusions are coming from there. Mine are originating from someone by the name of Max Braun.  But Verizon sticks to a false line of bull saying there's only so much they can do.
    If you've been having problems, I have an idea.  Don't sue for money, but get their trrademarks cancelled. If you can't rely on them as an indicator of safety, iot can be done.

    It's safe to use, it seems like an interesting extension actually.
    I am not affiliated with Best Buy nor have I ever been employed by Best Buy. All of my thoughts and posts are of my own opinion and personal experience.
    I may not always know the right answer, but I will always tell you what I do know. I also do free computer analysis and consultation via private message.

  • Hi I think its not a good idea to have "airplane mode" in Control center because if you lost your iphone person who find it could active it easy and you never find it

    Hi I think its not a good idea to have "airplane mode" in Control center because if you lost your iphone person who find it could active it easy and you never find it

    You can leave Apple your feedback here.
    You can disable Control Center on the lock screen here:
    Settings > Control Center

  • I'm looking into buying a prepaid phone from verizon on the website..do you think prepaid is good? how is it different from contract?

    right now i'm with sprint.i really hate sprint..there service isn't good at all.my contract is up in 2 months.so ive been buying phones from all these prepaid carriers and there service isnt reliable at all.i just buy them to see how there service are..i know it sounds dumb.so anyways that's why i come here...verizon is known for being reliable..so my point is,do you think i should go with verizon prepaid?are there prepaid services good? do you think its a good idea to go with verizon? i just need some advice cause i was gonna port my number from sprint to verizon..so i just need people's opinions..
    i am done with 'contracts' so i wanna go prepaid..i dont feel like signing another contract...plus i travel so thats why im considering verizon.

    In a roaming network, your "main" router is the device that would require port mapping/forwarding to be configured in order to access the IP camera from the Internet. This router is also the one that would be provide the private IP address for the camera which you will want to be a static one.
    So as you described your network, the IP cameras should be getting an IP address or you assigned it a static one and this is the address that you would enter in the Private IP address (or equivalent depending on the router used) field when setting up port mapping.
    If you are not able to access this camera from the local network, then this should be troubleshot first.

  • Did you know that Verizonwireless is saving your checking account information when you pay your bill by check and then making it part of your "MyVerizon"? This means of course if they get hacked that information could be compromised. What do you think of

    Did you know that Verizonwireless is saving your checking account information when you pay your bill by check and then making it part of your "MyVerizon"  without you adding it? This means of course if they get hacked that information could be compromised. What do you think of this?

    Credit card and debit card and checking and savings information is encrypted so it is possible to be hacked, but the odds are greater to get hit by the Love Boat then to have a wide scale hack.
    Oh yes they do happen, Bank of America, Chase, Citibank, Target and quite a few others. But in all the years I have paid my invoice with saved card information I never been hacked.
    You use good passwords and the risk is minimal.
    Good Luck

  • What job is good for me? do you think...

    Hi folks,
    I can see that you are cooperating all nicely; a sense of community indeed. And all for the sake of it. Keep it going...
    Now here is my question:
    I love databases, in fact crazy about them :-)
    i am certified in oracle 9i, and believe to have received good training in SQL, almost from A to Z. (Sure i can do joins and subqueries :-))
    I have a general idea, a good one still i think, about PL/SQL. (not as good as SQL*plus though).
    If i wanted to have a job in databases like Oracle, what should i be looking for?. Is knowing SQL good enough for a job???
    Put differently: has anyone started from this position and found their way out as far as databases are concerned?.
    I do have other skills but wish to diversify my job search.
    Thanks a bunch,
    -a

    Hi Nicolas,
    You have a good point. If you do a job you don't like, then this isn't going to work i think. Sooner or later you get bored:-)
    My point was, however, slightly different: are there jobs where you can utilize SQL*plus as a major skills?. If so, what kind of job titles should i be searching for on HotJobs etc.?.
    If SQL*plus alone isn't enough, what else should i need to learn as far as database programming is concerned?.
    Thanks,
    -a

Maybe you are looking for

  • Ford sync no longer works.

    After updating my iphone 5 to ios 6.1, it no longer works with my Ford Sync in my car. The phone does not play audio anymore while connected via USB. Audio doesnt play from any apps nor from the ipod through the car stereo. Same if I connect it via t

  • Assigning a hard value to multiple, varying MIDI events

    I have many midi notes that have, say, velocity values of 70-80. I want to select them all, and assign an absolute velocity of 75 to all of them. I can select them in the event list, but still can only change the value of one. Also, of course, I can

  • What type of connector needed for Russia and iPod?

    I'm traveling to Russia and will need to recharge iPod once I get there. What kind of adapter/connector will I need? I have the 80GB.

  • FormsCentral or Acrobat Pro?

    Hi there, I'm designing a pdf with several pages AND a form that must be able to be send back and forth a few times. Now I have to determine which is the best way to go: FormsCentral or Acrobat Pro The idea is that the form is filled in in several st

  • Embeddable Fonts for EPUB?

    I'm using ID CS6 to create EPUBs. When I try to export anything other than the usual Times New Roman, or other basic fonts, the fonts don't show up in the exported EPUB. For instance, I've tried using Minion Pro, Warnock, Lucida, etc. and all I get a