This week's book giveaway is in the Java in General forum.
We're giving away four copies of Helidon Revealed: A Practical Guide to Oracle’s Microservices Framework and have Michael Redlich on-line!
See this thread for details.
  • 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
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

database application problem with jtable binding

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bring me the box labeled "thinking cap" ... and then read this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic