-
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
-
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
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks