Results 1 to 3 of 3
- 01-28-2013, 04:14 AM #1
Member
- Join Date
- Jan 2013
- Posts
- 14
- Rep Power
- 0
JButton Running Another Main Class (help me)
Ok, so I need a JButton I have made to run another class. (Which will open a new GUI window.)
Here is a segment of my code:
item.addActionListener(this);
}
public void actionPerformed(ActionEvent e) {
if(e.getSource() == item)
{
}
The class I am trying to run is called 'ItemWriter'
The JButton is called 'item'
Please help!
Thanks!
-
Re: JButton Running Another Main Class (help me)
You may need to give us more information and post more code including perhaps your ItemWriter, how you try to run it and what happens when you try to run it, what problems you may be having. Also, when posting code, please make sure that it is formatted and that you use [code] [/code] tags.
- 01-28-2013, 08:05 AM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7
- Rep Power
- 29
Similar Threads
-
JButton not appearing when running JAR
By joet1984 in forum New To JavaReplies: 0Last Post: 01-27-2013, 09:01 PM -
setting JButton setEnabled() outside of main class
By danborgir in forum New To JavaReplies: 11Last Post: 05-07-2011, 05:03 PM -
Making an object of main and running a thread in main
By Grimmjow in forum New To JavaReplies: 1Last Post: 01-23-2011, 06:19 PM -
Running main method class from another main class
By tlrocketman in forum New To JavaReplies: 3Last Post: 12-06-2010, 09:30 AM -
Compiling/Running Project in Command Line: "Could not find main class" Error
By Yasemin Gokce in forum New To JavaReplies: 1Last Post: 06-30-2009, 03:32 PM
Bookmarks