• Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling the contents of public static void main in another class  RSS feed

 
sumedha vangury
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,I have the classes Embed.java and watermarkdemo.java

There are some lines of code in the main method of Embed.java.
I want to call the main method of Embed.java in the actionPerformed () method when the user clicks on the insert button.
Please can someone give me the outline of how this can be done?

I hope I am clear in my problem and it is easy to understand what I am actually saying.
Thankyou
 
Campbell Ritchie
Marshal
Posts: 56562
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sounds like dubious design. If you want to call methods of the watermark class why not call them directly?
You can of course call a main method the same way you call any other method
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!