• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

open a class from another class

 
Shierley Kencana
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm confused.how to open a class from another class by clicking the jbutton and at the same time the data from the textfield is being executed to the DB2. i'm using Visual Age for Java. Thanx
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
u can follow these steps..
1. u create a class say Dump2DB
2. u put a method in there say doDump()
3. u make that method accept arguments whatever u want to store in DB
4. u write a db connection code and everything in there (using jdbc)
5. u create an object of Dump2DB class in actionPerformed(ActionEvent) and call doDump() with appropriate argument
u r done!!
i assume u know little about jdbc, actionPerformed etc etc funny stuff u'd need here. if u are not aware then, feel free to post ur doubts here...
regards
maulin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic