aspose file tools*
The moose likes Beginning Java and the fly likes open a class from another class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "open a class from another class" Watch "open a class from another class" New topic
Author

open a class from another class

Shierley Kencana
Greenhorn

Joined: May 07, 2003
Posts: 10
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

Joined: Nov 04, 2001
Posts: 1871
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: open a class from another class