Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: Issue in a code

  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    4
    My Mood
    Confused
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Issue in a code

    code.doc

    Hi All,

    I am very very new to java. one of my friend asked me for a project for his study and i gave one which i got from another friend..now he is asking some clarification which i was not able to clear.....I have posted the code below... it is for a stationary management system and works with Netbean and MS access as database...things are working fine but only few issues....


    When i press the view button, it shows the "itemname,code,price and quantity". dats just fine..but when i close the view gui and open it again, it shows the same twice ex.""itemname,code,price and quantity"itemname,code,price and quantity" as contents...can some one help me to resolve it...also he asked that a message box needs to be displayed when the data is saved...can some one help me with that as well....
    1- how to get rid of that view issue
    2- please help me to code to get a message box when a item is saved...... your reply would be highly helpful......


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 262 Times in 231 Posts

    Default Re: Issue in a code

    Welcome ayyappad

    Please post the code to the forum and not as an attachment so people can see the code without the process of downloading and opening etc
    Please use code tags, assistance can be found on the Announcements page

  3. #3
    Junior Member
    Join Date
    Aug 2013
    Posts
    4
    My Mood
    Confused
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Issue in a code

    thanks for your response and advise jps....

    // your code goes here
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    /**
     *
     * @author hcl
     */
    import java.awt.BorderLayout;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.awt.event.ItemListener;
    import java.awt.event.ItemEvent;
    import java.sql.*;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.*;
    import javax.swing.JFrame.*;
    import javax.swing.JPanel;
    import javax.swing.JButton;
    import javax.swing.JComboBox;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.JOptionPane;
     
    import sun.jdbc.odbc.*;
    public class First {
        JFrame guiFrame1 = new JFrame();
        JFrame guiFrame2 = new JFrame();
        JFrame guiFrame3 = new JFrame();
        JFrame guiFrame4 = new JFrame();
        JFrame guiFrame5=new JFrame();
        JFrame guiFrame6=new JFrame();
        JFrame guiFrame7=new JFrame();
         JFrame guiFrame8=new JFrame();
        JLabel newline1=new JLabel("                                                                        ");
        JLabel label1=new JLabel("This is a stationry shop management software." );
        JLabel label2=new JLabel("It will be helpful for shop keepers to store and billing the stock details." );
        JLabel label21 =new JLabel("It also be helpful to update and delete stock.");
        JLabel label22=new JLabel("The Shopkeeper can view the sock details through this application");
        JLabel label3=new JLabel("To store the new stock details  ");
        JLabel label4=new JLabel("To delete the stock details         ");
        JLabel label5=new JLabel("To billing the stock details         ");
        JLabel label6=new JLabel("                   Store the item                         ");
        JLabel label7=new JLabel("Enter Itemcode      ");
        JLabel label8=new JLabel("Enter name        ");
        JLabel label10=new JLabel("Enter Rate           ");
         JLabel label9=new JLabel("Enter Quantity   ");
         JLabel label11=new JLabel("Enter Itemname        ");
         JLabel label12=new JLabel("To update the stock details       ");
         JLabel label13=new JLabel("Select itemname     ");
         JLabel label14=new JLabel("   Rate                       ");
         JLabel label15=new JLabel("   Quantity                ");
         JLabel total=new JLabel("Total: ");
         JLabel amount=new JLabel();
         JLabel view=new JLabel("To view the stock details          ");
        JTextField textfield1=new JTextField(10);
        JTextField textfield2=new JTextField(10);
        JTextField textfield3=new JTextField(10);
        JTextField textfield4=new JTextField(10);
        JTextField textfield5=new JTextField(10);
        JTextField textfield6=new JTextField(16);
        JTextField textfield7=new JTextField(16);
        JButton click = new JButton( "click to procceed");
        JButton store = new JButton( "Store");
        JButton delete = new JButton( "Delete");
         JButton update = new JButton( "Update");
        JButton billing = new JButton( "Billing");
        JButton items=new JButton("Ok");
        JButton deleteitem=new JButton("Ok");
        JButton save=new JButton("Save");
        JButton addrow = new JButton("Add row");
        JButton calculate=new JButton("Calculate Price");
        JButton deleterow = new JButton("Delete row");
        JButton viewstock=new JButton("View  ");
        JPanel panel1=new JPanel();
        JPanel panel2=new JPanel();
        JPanel panel3=new JPanel();
        JPanel panel4=new JPanel();
        JPanel panel5=new JPanel();
        JPanel panel6=new JPanel();
        JPanel panel7=new JPanel();
        JPanel panel8=new JPanel();
        JComboBox combo1=new JComboBox();
        JTable table;
        JTable table1;
        DefaultTableModel model = new DefaultTableModel();
        DefaultTableModel model1=new DefaultTableModel();
        JScrollPane scroll;
        JScrollPane scroll1;
        String temp1;
       String temp2;
       String temp3;
       String temp4;
       String temp5;
       String data[];
       String temp6;
       String temp7;
       String temp8;
       String temp9;
       String temp10;
       String name;
       String rate;
       String quantity;
       int a;
       int b;
       int i=0;
       int j=1;
       int k=2;
       int q=3;
       int p=0;
       Connection c;
       String name1 = "test";
       String pass = "test";
       String url = "jdbc:odbc:shop";
     
      public First()
        {
     
            //make sure the program exits when the frame closes
            //guiFrame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            guiFrame1.setTitle("Stock Management");
            guiFrame1.setSize(450,300);
            //This will center the JFrame in the middle of the screen
            guiFrame1.setLocationRelativeTo(null);
            guiFrame1.setVisible(true);
            panel1.add(newline1);
            panel1.add(label1,BorderLayout.LINE_START);
            panel1.add(label2,BorderLayout.AFTER_LAST_LINE);
            panel1.add(label21);
            panel1.add(label22);
            panel1.add(click,BorderLayout.AFTER_LAST_LINE);
            guiFrame1.add(panel1);
     
           click.addActionListener(new ActionListener()
            {
                //@Override
                public void actionPerformed(ActionEvent event)
                {
     
                    //guiFrame2.setDefaultCloseOperation(;
                    guiFrame2.setTitle("Stock Management");
                    guiFrame2.setSize(275,250);
     
            //This will center the JFrame in the middle of the screen
                    guiFrame2.setLocationRelativeTo(null);
                    guiFrame2.setVisible(true);
                    panel2.add(newline1);
                    panel2.add(label3,BorderLayout.PAGE_START);
                    panel2.add(store);
                    panel2.add(label12);
                    panel2.add(update);
                     panel2.add(label4);
                    panel2.add(delete);
                    panel2.add(label5);
                    panel2.add(billing);
                     panel2.add(view);
                     panel2.add(viewstock);
                    guiFrame2.add(panel2);
     
     
                }
     
     
                       });
     
     
     
      store.addActionListener(new ActionListener()
            {
                //@Override
                public void actionPerformed(ActionEvent event)
                {
     
                    // guiFrame4.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    guiFrame4.setTitle("Store Items");
                    guiFrame4.setSize(270,250);
     
     
            //This will center the JFrame in the middle of the screen
                    guiFrame4.setLocationRelativeTo(null);
                    guiFrame4.setVisible(true);
                    panel4.add(newline1);
                    panel4.add(label6);
                     panel4.add(newline1);
                    panel4.add(label7);
                    panel4.add(textfield1);
     
                     panel4.add(label8);
                    panel4.add(textfield2);
     
                     panel4.add(label10);
                    panel4.add(textfield3);
                     panel4.add(label9);
                    panel4.add(textfield4);
                    panel4.add(items);
                    guiFrame4.add(panel4);
     
     
                }
     
     
    });
     
    items.addActionListener(new ActionListener()
            {
                //@Override
                public void actionPerformed(ActionEvent event)
                {
     
                   try {
     
                 System.out.println("connecting to the " + name1 + " data source...");
     
                 temp1=textfield1.getText();
                 temp2=textfield2.getText();
                 temp3=textfield3.getText();
                 temp4=textfield4.getText();
     
                 Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                 c = DriverManager.getConnection(url, name1, pass);
                 Statement st = c.createStatement();
                 System.out.println(temp1+temp2+temp3+temp4);
                  st.executeUpdate("insert into stock values    ("+temp1+",'"+temp2+"',"+temp3+","+temp4+")");
                //joptionpane.showmessagedialog("item is stored in the database!");
                textfield1.setText("");
                textfield2.setText("");
                textfield3.setText("");
                textfield4.setText("");
     
        }
     
        catch(Exception ex)
        {
                ex.printStackTrace();
        }
     
    }
    });
     delete.addActionListener(new ActionListener()
            {
                //@Override
         ResultSet rs0;
                public void actionPerformed(ActionEvent event)
                {
                   // guiFrame5.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    guiFrame5.setTitle("Delete Items");
                    guiFrame5.setSize(275,250);
            //This will center the JFrame in the middle of the screen
                    guiFrame5.setLocationRelativeTo(null);
                    guiFrame5.setVisible(true);
                    panel5.add(newline1);
                    panel5.add(label11);
                    panel5.add(textfield5);
                    panel5.add(deleteitem);
                    guiFrame5.add(panel5);
     
                }
     });
       deleteitem.addActionListener(new ActionListener()
            {
                //@Override
                public void actionPerformed(ActionEvent event)
                {
                  try {
     
                 System.out.println("connecting to the " + name1 + " data source...");
                 temp5=textfield5.getText();
                 Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                 c = DriverManager.getConnection(url, name1, pass);
                 Statement st1 = c.createStatement();
                 System.out.println(temp5);
                 String sql2 = "Delete from stock where itemname = '"+(temp5)+"'";
                 st1.executeUpdate(sql2);
                 JOptionPane.showMessageDialog(null, "Item is deleted from the database!");
                 textfield5.setText("");
     
        }
     
        catch(Exception ex)
        {
                ex.printStackTrace();
        }
                }
            });
     
            update.addActionListener(new ActionListener()
            {
                //@Override
                public void actionPerformed(ActionEvent event)
                {
                    //guiFrame6.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    guiFrame6.setTitle("Update Items");
                    guiFrame6.setSize(350,250);
                     //This will center the JFrame in the middle of the screen
                    guiFrame6.setLocationRelativeTo(null);
                    guiFrame6.setVisible(true);
     
                    ResultSet rs;
     
                     try {
     
                            System.out.println("connecting to the " + name1 + " data source...");
                            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                            c = DriverManager.getConnection(url, name1, pass);
                            Statement st2 = c.createStatement();
                            rs = st2.executeQuery("select itemname from stock");
                            JComboBox combo=new JComboBox();
                            panel6.add(label13);
                            panel6.add(combo);
     
                            panel6.add(label14);
                            panel6.add(textfield6);
                            panel6.add(label15);
                            panel6.add(textfield7);
                            panel6.add(save);
     
                             while (rs.next())
                              {
                                    name  = rs.getString("itemname");
                                    combo.addItem(name);
                              }
     
     
                  combo.addItemListener(new ItemListener()
                  {
     
                         public void itemStateChanged(ItemEvent e)
                            {
     
     
                                        temp6=e.getItem().toString();
                                         if (e.getStateChange() == e.SELECTED)
                                          {
                                        System.out.println(temp6 + " was selected\n");
                                        //System.out.println(temp6);
     
                                        save.addActionListener(new ActionListener()
                                         {
                                             //@Override
     
                                             public void actionPerformed(ActionEvent event)
                                               {
                                                  try {
     
                                                         System.out.println("connecting to the " + name1 + " data source...");
                                                         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                                                         c = DriverManager.getConnection(url, name1, pass);
                                                         Statement st3 = c.createStatement();
                                                         System.out.println(temp6);
                                                         rate=textfield6.getText();
                                                         quantity=textfield7.getText();
                                                         String sql4 = "Update stock set rate='" + (rate)+ "', quantity='" + (quantity)+ "' where itemname = '" + (temp6) + "'";
                                                         st3.executeUpdate(sql4);
     
                                                         textfield6.setText("");
                                                         textfield7.setText("");
     
                                                       }
                                                   catch(Exception ex)
                                                        {
                                                          ex.printStackTrace();
                                                        }
     
                                               }
                                        });
                                       }
                                    }
     
     
                            });
     
     
               guiFrame6.add(panel6);
     
         }
         catch(Exception ex)
            {
                ex.printStackTrace();
            }
             }
               });
               billing.addActionListener(new ActionListener()
                {
                //@Override
                    public void actionPerformed(ActionEvent event)
                    {
                       // guiFrame7.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                        guiFrame7.setTitle("Billing");
                        guiFrame7.setSize(500,200);
     
     
                     //This will center the JFrame in the middle of the screen
                        guiFrame7.setLocationRelativeTo(null);
                        guiFrame7.setVisible(true);
     
                       model.addColumn("ITEM NAME");
                       model.addColumn("RATE");
                       model.addColumn("QUANTITY");
                       model.addColumn("PRICE");
     
                	  // Create a new table instance
                      table = new JTable( model );
            		 // Add the table to a scrolling pane
                      scroll = new JScrollPane( table );
                      panel7.add( scroll, BorderLayout.CENTER );
                      panel7.add(addrow);
                      guiFrame7.add(panel7);
                    }
               });
        addrow.addActionListener(new ActionListener() {
     
          public void actionPerformed(ActionEvent event) {
     
                    ResultSet rs1;
     
                     try {
     
                            System.out.println("connecting to the " + name1 + " data source...");
                            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                            c = DriverManager.getConnection(url, name1, pass);
                            Statement st4 = c.createStatement();
                            rs1 = st4.executeQuery("select itemname from stock");
                            JComboBox combo=new JComboBox();
                            panel7.add(combo);
                            panel7.add(calculate);
                            panel7.add(newline1);
                            panel7.add(deleterow);
                             while (rs1.next())
                              {
                                    name  = rs1.getString("itemname");
                                    combo.addItem(name);
     
     
                              }
     
     
                  combo.addItemListener(new ItemListener()
                  {
     
                    ResultSet rs4;
     
                         public void itemStateChanged(ItemEvent e)
                            {
                                 temp6 = (String)e.getItem();
                                 if (e.getStateChange() == e.SELECTED)
                                    {
                                     System.out.println(temp6 + " was selected\n");
     
                                    try {
     
                                        System.out.println("connecting to the " + name1 + " data source...");
                                        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                                         c = DriverManager.getConnection(url, name1, pass);
                                         Statement st4 = c.createStatement();
                                         rs4 = st4.executeQuery("select rate from stock where itemname = '"+(temp6)+"'");
     
                                        while (rs4.next())
                                         {
                                            rate  = rs4.getString("rate");
                                            System.out.println(rate);
                                            String[] adddata = { temp6, rate, "", "" };
                                             model.addRow(adddata);
                                             a=Integer.parseInt(rate);
                                             b=model.getRowCount();
                                             System.out.println(b);
                                          }
     
     
                         }
            catch(Exception ex)
                {
                ex.printStackTrace();
                 }
                                    }
                                else
                                    {
                                     System.out.println(temp6 + " was deselected\n");
                                    }
     
     
                            }
     
     
                    });
     
     
               guiFrame6.add(panel6);
     
         }
         catch(Exception ex)
            {
                ex.printStackTrace();
            }
             }
               });
     
        calculate.addActionListener(new ActionListener() {
     
     
                    ResultSet rs5;
     
     
          public void actionPerformed(ActionEvent event) {
              try {
     
                            panel7.add(total);
     
                            System.out.println("connecting to the " + name1 + " data source...");
                            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                            c = DriverManager.getConnection(url, name1, pass);
                            Statement st5 = c.createStatement();
                            Statement st6= c.createStatement();
     
              System.out.println(b);
              System.out.println(i);
              int su=0;
            for(i=0;i<b;i++)
             {
                    Object obj0 = GetData(table,i , p);
                    System.out.println("Cell value of 0 column and "+i+" row :" + obj0);
                    Object obj1 = GetData(table,i , j);
                    System.out.println("Cell value of 1 column and "+i+" row :" + obj1);
     
                    Object obj2 = GetData(table, i, k);
                    System.out.println("Cell value of 2 column and "+i+" row :" + obj2);
    String s=obj0.toString();
    int x=Integer.parseInt(obj1.toString());
    int y=Integer.parseInt(obj2.toString());
     
     
                     rs5 = st5.executeQuery("select quantity from stock where itemname= '"+(s)+"'");
                      while (rs5.next())
                              {
                                    quantity  = rs5.getString("quantity");
                                    System.out.println(quantity);
                                    int change_quantity=Integer.parseInt(quantity);
                                    if(change_quantity>=y)
                                    {
                                       int z=x*y;
                                       su=su+z;
                                       String sum_temp=Integer.toString(su);
                                       amount.setText(sum_temp);
                                       panel7.add(amount);
                                       System.out.println(z);
                                       Object obj3=z;
                                       table.getModel().setValueAt(obj3, i, q);
                                       int final_quantity=change_quantity-y;
                                       System.out.println(final_quantity);
                                       String sql5 = "Update stock set quantity='" + (final_quantity)+ "'where itemname = '" + (s) + "'";
                                       st6.executeUpdate(sql5);
                                    }
                                    else
                                    {
                                         JOptionPane.showMessageDialog(null, "The quantity of the Item "+s+" is only "+change_quantity);
                                    }
     
     
                     }
     
     
     
        }
     
              }
     
           catch(Exception ex)
            {
                ex.printStackTrace();
            }
          } });
        viewstock.addActionListener(new ActionListener() {
     ResultSet rs6;
          public void actionPerformed(ActionEvent event) {
              // guiFrame8.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                        guiFrame8.setTitle("View Stock");
                        guiFrame8.setSize(500,250);
     
     
                     //This will center the JFrame in the middle of the screen
                        guiFrame8.setLocationRelativeTo(null);
                        guiFrame8.setVisible(true);
                       //panel7.add(newline1);
                       model1.addColumn("ITEM CODE");
                       model1.addColumn("ITEM NAME");
                       model1.addColumn("RATE");
                       model1.addColumn("QUANTITY");
                      // Create a new table instance
                      table1 = new JTable( model1 );
               		// Add the table to a scrolling pane
                    scroll1 = new JScrollPane( table1 );
                    panel8.add( scroll1, BorderLayout.CENTER );
                     try {
     
                            System.out.println("connecting to the " + name1 + " data source...");
                            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                            c = DriverManager.getConnection(url, name1, pass);
                            Statement st7 = c.createStatement();
                            rs6 = st7.executeQuery("select * from stock where itemname ");
                                       // a=e.getStateChange();
                                     while (rs6.next())
                              {
                                    temp7  = rs6.getString("itemcode");
                                    temp8=rs6.getString("itemname");
                                    temp9=rs6.getString("rate");
                                    temp10=rs6.getString("quantity");
                                    System.out.println(temp7);
                                    String[] adddata = { temp7, temp8, temp9, temp10 };
                                    model1.addRow(adddata);
     
                                  }
     
                         }
            catch(Exception ex)
                {
                ex.printStackTrace();
                 }
            guiFrame8.add(panel8);
     
          }
     
          });
          deleterow.addActionListener(new ActionListener() {
            ResultSet rs7;
           public void actionPerformed(ActionEvent event) {
     
                 int r=table.getSelectedRow();
                 int n=table.getRowCount();
                 System.out.println(r);
                 Object obj4 = GetData(table,r, p);
                 System.out.println("Cell value of 0 column and "+r+" row :" + obj4);
                 Object obj5 = GetData(table, r, k);
                 System.out.println("Cell value of 2 column and "+r+" row :" + obj5);
                 Object obj6 = GetData(table, r, k+1);
                 System.out.println("Cell value of 2 column and "+r+" row :" + obj6);
                 if(obj6!="")
                  {
                        int su=0;
                        int y=Integer.parseInt(obj5.toString());
                        int x=Integer.parseInt(obj6.toString());
                        String s=obj4.toString();
     
                        try
                        {
                            System.out.println("connecting to the " + name1 + " data source...");
                            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                            c = DriverManager.getConnection(url, name1, pass);
                            Statement st8 = c.createStatement();
                            Statement st9= c.createStatement();
                            rs7 = st8.executeQuery("select quantity from stock where itemname= '"+(s)+"'");
                        while (rs7.next())
                              {
                                    quantity  = rs7.getString("quantity");
                                    System.out.println(quantity);
                                    int change_quantity=Integer.parseInt(quantity);
                                    int final_quantity=change_quantity+y;
                                    System.out.println(final_quantity);
                                    String sql5 = "Update stock set quantity='" + (final_quantity)+ "'where itemname = '" + (s) + "'";
                                    st9.executeUpdate(sql5);
     
                              }
     
     
     
                       }
                  catch(Exception ex)
                {
                ex.printStackTrace();
                 }
                        model.removeRow(r);
     for(i=0;i<n;i++)
             {
     
                    Object obj2 = GetData(table, i, k+1);
                    System.out.println("Cell value of 2 column and "+i+" row :" + obj2);
                    int h=Integer.parseInt(obj2.toString());
               su=su+h;
               String sum_temp=Integer.toString(su);
               amount.setText(sum_temp);
              }
                 }
                 else
                 {
                  model.removeRow(r);
                 }
     
           }
          });
     
    }
     
       public Object GetData(JTable table, int row_index, int col_index)
       {
       return table.getModel().getValueAt(row_index, col_index);
     
       }
     
     
         public static void main(String[] args)
         {
     
            First f=new First();
     
       }
     
    }

    Please find the above code....
    Last edited by jps; August 2nd, 2013 at 07:11 PM. Reason: fixed code tag

  4. #4
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 262 Times in 231 Posts

    Default Re: Issue in a code

    1) If something is being added twice, then the code says to add it twice. Filter through the code to see how many times it is added. Use printlns to determine when and how many times a block of code is executed. Due to the length of the posted code, I will allow you the opportunity to narrow down the problem to a manageable section of code to look at

    2) I would use something like a JDialog extension or something of that nature

  5. #5
    Junior Member
    Join Date
    Aug 2013
    Posts
    4
    My Mood
    Confused
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Issue in a code

    hmmm..... thanks again jps for having a look..... but i dont understand how and whr to start with....i assume my friend would know abt these...lemme send your comment to him.....

  6. #6
    Junior Member
    Join Date
    Aug 2013
    Posts
    4
    My Mood
    Confused
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Issue in a code

    Thanks for your concern in looking into the issue jps...I checked with my friend and even he is not aware of how it is done...To be frank we are not really with a back ground of java or any coding...He is into his first year of his computer educations and they asked him to do this as a project...Even after getting the code he is struggling a lot...It just looks like a language i dont understand...Is it possible for you to advise on the changes that needs to be done for the code to rectify the errors please...
    Could you please help us in this regards...

  7. #7
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 262 Times in 231 Posts

    Default Re: Issue in a code

    Quote Originally Posted by ayyappad View Post
    ...my friend and even he is not aware of how it is done... ...It just looks like a language i dont understand...Is it possible for you to advise on the changes that needs to be done for the code to rectify the errors please...
    Could you please help us in this regards...
    I have given suggestions on how to proceed with both issues in the OP. If you and your friend do not understand the suggestions then I am afraid you need more help than what is normally provided on a forum. Who wrote the posted code? The author of that code should surely understand what was suggested

Similar Threads

  1. Java version issue, or code issues
    By j0rd4nn in forum What's Wrong With My Code?
    Replies: 1
    Last Post: February 16th, 2013, 06:21 AM
  2. I am having an issue with my code
    By gmamagoodwin in forum What's Wrong With My Code?
    Replies: 1
    Last Post: February 9th, 2012, 10:36 PM
  3. code issue, should be silple been working on it for four hours
    By Custermd in forum What's Wrong With My Code?
    Replies: 4
    Last Post: September 30th, 2011, 01:19 PM
  4. Beginner trying to write Java code, has issue w/ printing result and 2 decimals
    By flpanthers1 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: June 5th, 2011, 11:11 AM
  5. Issue with code. Does not detect duplicate names in file
    By suxen in forum What's Wrong With My Code?
    Replies: 3
    Last Post: March 29th, 2011, 01:13 AM