Win a copy of Microservices in Action this week in the Web Services forum!
  • 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
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

database application problem with jtable binding  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i have a bit of trouble understanding the creation of a database application using netbeans and i hope someone could clear things up a little for me. I created 2 tables using sql named "staff" and "cars"(just random) and each has few attributes. What i would like to do is create an application where i can add,edit,delete staff and cars but do that on separate forms. I did a tutorial on netbeans where these 2 things were done on the same form (it had 2 jtables on the first page of the application). I want to separate this so in one jdialog i have staff jtable and i have a second jdialog which contains jtable about the cars. I tried to put a button on the first jdialog (the one created from the wizard when i created the project)which when clicked will open the second jdialog and it works until i bind my jtable on the second jdialog ( i bind it by clicking on the Import Data to Form and then selecting my database and the table).


this is the generated code which opens the first jpanel. Does anyone have any idea what am i doing wrong in the biding process as this seems to be the problem?
The error i get when i click on the button that should display the second jdialog is

Exception in thread "AWT-EventQueue-0" java.lang.Error: java.lang.reflect.InvocationTargetException
at org.jdesktop.application.ApplicationAction.actionFailed(ApplicationAction.java:859)
at org.jdesktop.application.ApplicationAction.noProxyActionPerformed(ApplicationAction.java:665)
at org.jdesktop.application.ApplicationAction.actionPerformed(ApplicationAction.java:698)


Thanks in advance and sorry if im completely on the wrong track
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!