Results 1 to 7 of 7

Thread: Java and MySQL

  1. #1
    Abder-Rahman is offline Member
    Join Date
    Oct 2008
    Posts
    32
    Rep Power
    0

    Default Java and MySQL

    Hello,

    I have created a very simple MySQL database and created a table with two columns, namely "X", and "Y".

    After that, I created a desktop database Java application for that.

    My question is:

    I want to add a button that is responsible for calculating the SUM of the "X" column values.

    So, in other words, when I press a button, I want get the average of the "X" column as a result.

    How can I add this functionality to the button?

    So, my issue is just how to apply the SUM command through clicking a button.

    Thanks.

  2. #2
    mtyoung is offline Senior Member
    Join Date
    Dec 2008
    Location
    Hong Kong
    Posts
    473
    Rep Power
    7

  3. #3
    Abder-Rahman is offline Member
    Join Date
    Oct 2008
    Posts
    32
    Rep Power
    0

    Default

    Thank you very much for your kind reply.

    Do you have any idea how to do that through a tool like NetBeans, especially that some steps will be already automated.

  4. #4
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Learn how to do it manually, first. So that you actually know what you're doing and can understand what the IDE does when it does something for you.

    Once you know how to do it it yourself, figuring out how to let the IDE do it for you will be almost intuitive, and you will actually understand what's happening so that you will be able to debug it if something goes wrong.

  5. #5
    Abder-Rahman is offline Member
    Join Date
    Oct 2008
    Posts
    32
    Rep Power
    0

    Default

    Thanks.

    I agree with you.

  6. #6
    mtyoung is offline Senior Member
    Join Date
    Dec 2008
    Location
    Hong Kong
    Posts
    473
    Rep Power
    7

    Default

    i dont know how to make GUI by ide... as ide do not know what i want, i may need to check the code again

    if i need to check code after those automated tasks, why i just do it manually?

  7. #7
    Abder-Rahman is offline Member
    Join Date
    Oct 2008
    Posts
    32
    Rep Power
    0

    Default

    Just in case to make some customizations, like performing some operations (Sum, Average, ...etc).

Similar Threads

  1. MySQL/JDBC Mysql query output
    By thelinuxguy in forum Advanced Java
    Replies: 4
    Last Post: 02-13-2009, 02:57 AM
  2. java programming with MySQL
    By sweet angle in forum JDBC
    Replies: 6
    Last Post: 10-29-2008, 07:14 AM
  3. mysql connector to java
    By sweet angle in forum JDBC
    Replies: 4
    Last Post: 10-20-2008, 07:33 AM
  4. java to mysql
    By thamizhisai in forum New To Java
    Replies: 12
    Last Post: 04-28-2008, 08:48 AM
  5. java to mysql
    By thamizhisai in forum Advanced Java
    Replies: 1
    Last Post: 04-26-2008, 09:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •