• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

insertion of data in a particular column in a editor table in a database

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All ,
i want to edit particular column in my j table,i used iscelleditable() but if i will select particular column ,row for user input with hardcoded location the value entered into database but if i use loop so that as user select next row the value has to entered into database in next row and so on automatically it is not working out.I am pasting code here,i attached screenshot too ,here i want to enter in column number 3 and value has to entered into database,
My next question Sir,
I want to get value from database here in my stock quantity i want to get a value at a runtime means as user enetered into stockquantity it has to show at that time wether the thing is in stock or not if not it has to cancel.
1.jpg
[Thumbnail for 1.jpg]
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

You have found the wrong forum; this one is for discussing the Ranch itself. I shall move you.
You are going to make life difficult for yourself if you try insertion into the database and updating the column simultaneously. Do one or the other. In fact I think you should remove all your GUI code and not add a GUI until you can reliably show all the database operations at a terminal/command line. Let's get the database operation working first, so I shall move you to the databases forum.

Why are you writing null 36 times? If you want 36 nulls you can simply write new Object[6][6].
 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As suggested by Campbell, you first need to make sure that your db operations are perfect. Then it would be nice if you could please elaborate little more on your UI functionality as per the screen design.
 
monisha kasturi
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i am able to connect with database and the values are going properly now next thing is jcombos linking,suppose if i user will select the any value from jcombo then this value will trigger rest two combos that is description and the location as show in fig,As the values are in the databse but i am not getting the logoic how can i solve this issue, here what i have done liitle code by this iam able to called values in the jcombos but how can i do this ,that if we select one value in jcombo1(main combo) the rest other have to select automatically this is the method i have prepared inside class as shown above
thankyou so much all


 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Monisha

I think you should use ItemLister with JComboBox and on itemStateChanged event perform the necessary action.
 
monisha kasturi
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Swastik ,
I know i should have to use itemlistener or action listener but how should i use into my jdialog where to put this method because thsese are to extend from classes but i already have one class of jdialog now where should i put it,if you have any dummy code please forword me just for understanding.
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It could be somewhat like this

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic