• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

List not getting filled with data from database

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hy everyone,

this is my first time writing on a forum. I hope I will be able to explain everything correctly.
So after hours of work I am still not getting my program to work. I am creating a GUI which if empty gives all data from database or if you enter last name it gives you last name and other data from that employee. I have already a database with data, now I am trying to connect to it, store the data in a list and then show it in a JTable.
my tableModel class

my class for connecting to DB and storing data to a list

and my gui


I hope there is someone who can give me some kind of a hint or solution of what I am doing wrong.

Thank you
 
Bartender
Posts: 5906
57
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This doesn't make sense. You are adding a list's elements to itself. You are not returning anything or setting any external list.
 
Anna Lunes
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i thought to store the list from another class ant then call it in GUI class.. havent thought about trying to do it other way. Thanks I will try to fix it that way  
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!