Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-17-2008, 06:07 PM
Member
 
Join Date: Oct 2008
Posts: 2
Rep Power: 0
wanw84 is on a distinguished road
Default is this possible?
Hi, im still a newbie in Java programming. I want to ask something.

I made a java class for example 'Train.java'.
Now i want to make a gui. Is it possble when i click a button (already made) will execute the 'Train.java' file?
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 11-17-2008, 09:21 PM
Member
 
Join Date: Oct 2008
Location: Sweden, Gothenburg
Posts: 21
Rep Power: 0
zoomix is on a distinguished road
Default
Well, yes. Sure. But that's generally not the way you want to do things. It's sort of like buying a ferrari but only ever driving it in reverse gear.

Anyway. Add a listener to your button and have it run Train.main(null);
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-17-2008, 11:53 PM
Member
 
Join Date: Nov 2008
Posts: 2
Rep Power: 0
hazem.mohamed is on a distinguished road
Default
can you attach the contents of your files to know how to help you? or just tell us what do you want to do?


---------------------------------------------------------------
My First Post
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +2. The time now is 05:07 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org