Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: open a class from another class
 
Similar Threads
Netscape 4 Security Exception
When I Run Main Project in NetBeans (F6) It always runs a project that isn't even open
firstName has private access in Person
A record day for JavaRanch - 17,281 unique users in one day
in login system how dispose first open window not all