a simple program


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: a simple program

  1. #1
    Sindu Guest

    a simple program


    I am currently doing a program. I have created a table with the headings
    item number, item, quatitiy ,cost and total. At the bottom I have a label
    for each item, when the enter button (also created) is pressed the details
    will automatically be displayed in the appropriate columnms, no probs I here
    you say.

    My problem is that the user has to enter all the details, what I want the
    program to do is, when the number is item number is entered, the name of
    the item should be displayed automatically, also displaying the price in
    the price column, when the quantity is typed in, the total (multiplication)
    of that item must be displayed within the total column, I hope you can give
    me a hint or help me , I will greatly appreciate it.



    Sindu

  2. #2
    Rishi Guest

    Re: a simple program


    "Sindu" <sinthuja21@hotmail.com> wrote:
    >
    >I am currently doing a program. I have created a table with the headings
    >item number, item, quatitiy ,cost and total. At the bottom I have a label
    >for each item, when the enter button (also created) is pressed the details
    >will automatically be displayed in the appropriate columnms, no probs I

    here
    >you say.
    >
    >My problem is that the user has to enter all the details, what I want the
    >program to do is, when the number is item number is entered, the name of
    >the item should be displayed automatically, also displaying the price in
    >the price column, when the quantity is typed in, the total (multiplication)
    >of that item must be displayed within the total column, I hope you can give
    >me a hint or help me , I will greatly appreciate it.
    >
    >
    >
    >Sindu



    Hints ::::::::::

    1
    add table model listner
    write code in tableChanged method

    2 create instace of DefaultTableModel and write code in setValueAt()

    explore it and do the work u need

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center