• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Chice(drop down) items adding from database

 
Ranch Hand
Posts: 67
Mac Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello friends,

i can't post my code but i can only give idea what i tried

i need to take values from a database field and show in choice object to choose any one of them
i have method in applet
project having some model java file to set commands and set related variables and objects
i added a command to get details from database and added database functioning method in model file

on applet file,in method i made a choice object
i call method to set command to getDetails
i code to remove all existing items from choice
i checking in for loop for the no. of records in database existing and in loop i trying to add as choice items by casting the vector object i am storing the database value to String
then i wrote code to select 1st record to select by default and the i coded to show the choice object
and after that i am adding in Panel to show on screen

i am getting : stating null-pointer exception at the code line where i call method to set command for model class

i am stuck now... any helps will be helpful
please help me

thank you all in advance
 
Marshal
Posts: 28425
102
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Null pointer exception? That means you're trying to use a method of a variable which contains a null reference. You will have to fix your code so that it doesn't do that.

The stack trace tells you the line number where the error occurred.

That's about all it's possible to say without seeing any code. Good luck with your problem.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic