• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Associate a java code to a button -- please help

 
Foni kumar
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a java code to create an excel sheet automatically named createexcel.java . Suppose I want to create a button and link that button to this java code so that upon double click of the button the java code should run automatically and create the excel sheet.

Can any one guide me how can i tackle this scenario (At this point of time I have just the java code with me createexcel.java ) but i am unable to implement the rest of the part i mentioned. It. will be great if someone can provide some sample codes just to have an idea

Appreciate you help in this regard.
Thanks and Regards,
Debashis
 
Koen Aerts
Ranch Hand
Posts: 344
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean something like:
 
Foni kumar
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou Koen for your reply ,the shell function in java is mainly used for routine based tasks. Now can we include this under our button functionality(in AWT/SWT) so that onclick event initiates the execution of the java class. On double click of the button i want the code to execute the functionality..

Kind Regards
Deb
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the API for JButton and follow the link to the tutorial on How to Use Buttons, Check Boxes, and Radio Buttons.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic