473,387 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

key event not work after making jar file

hi,
I write one file with two buttons.Code for that is as fallow.

public void actionPerformed(ActionEvent e)
{
try
{

if(e.getSource()==cancel)
{
frame.hide();

}

else if(e.getSource()==create)
{

category[0] =(String)Oone.getSelectedItem();
category[1] =(String)Otwo.getSelectedItem();
category[2] =(String)Othree.getSelectedItem();
category[3] =(String)Ofour.getSelectedItem();

wv1=(String)w1.getSelectedItem();
wv2=(String)w2.getSelectedItem();

sv1=(String)s1.getSelectedItem();
sv2=(String)s2.getSelectedItem();

erav1=(String)era1.getSelectedItem();
erav2=(String)era2.getSelectedItem();

whipv1=(String)whip1.getSelectedItem();
whipv2=(String)whip2.getSelectedItem();


final Automatic automatic = new Automatic(category[0],category[1],category[2],category[3],category[4],category[5],category[6],category[7]);

frame.setContentPane(automatic);

frame.setVisible(true);
}

}catch(Exception e1)
{
System.out.println("hi..."+e1);
}

}

There is two Buttons 1.Create Team 2.Cancel
This both the buttons work at command prompt.but when I make the jar file of this whole project only cancel button works, another button Create Team doesn't perform any action.

I can't understand what is the reason behind this.

Thanks In advance.

Thanks,
Vikas Sawant.
Mar 15 '09 #1
2 1645
r035198x
13,262 8TB
Do you mean that the code works correctly when you run the class files but doesn't work when you package the class files inside a jar file?
Are you sure you are including the correct class files when making the jars? Perhaps there is an old class file somewhere which is being included instead of the one that works.
Mar 16 '09 #2
Yes. you are Right.

When I delete all old class files from folder and make new Jar file then it works fine.

Thanks,
Vikas Sawant.
Mar 17 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Anand Pillai | last post by:
This is for folks who are familiar with asynchronous event handling in Python using the asyncore module. If you have ever used the asyncore module, you will realize that it's event loop does not...
5
by: Tom Louchbaum | last post by:
When I preview my Access 2000 Report it looks fine. When I Email the report using DoCmd.SendObject acSendReport, "Report", acFormatRTF, "To Address", , , "Subject", , False the resulting...
1
by: Michael McCarthy | last post by:
I've written an event that tells me that I've connected properly to a remote telnet location. When I know that I'm connected I fire the event which is being listened for in a bit of code that then...
8
by: Dave Wurtz | last post by:
All, Is there a way to force a derived class to contain an event. I have done this with methods (i.e. Protected MustOverride Sub Test), but can I do something similar with an event (Protected...
1
by: Steve | last post by:
Looking for some help on this one... I have three servers (development, staging, production), each running the same code. All three computers are running Windows 2003 Server, IIS 6.0. I have...
9
by: jeff | last post by:
New VB user...developer... Situation...simplified... - I want to wrap a pre and post event around a system generated where the pre-event will always execute before the system event and the...
4
by: AzizMandar | last post by:
C++ Event Coding Questions I have done some simple programs in C++ and read a lot of good C++ books (Including The C++ Programing Language, and C++ Primer) I am trying to understand and...
17
by: Eric | last post by:
I'm new to JavaScript and I wrote this code to play with. Oddly, if I enter text in a box and then press the button, I only get the onChange event for the text box and not the button's onclick...
1
by: Lila Godel | last post by:
My VB.NET 2008 application is setup with a Sub Main and no forms. At run time a NotifyIcon is created with one context menu choice (Close which terminates app). I have no trouble running the...
24
by: =?Utf-8?B?U3dhcHB5?= | last post by:
Can anyone suggest me to pass more parameters other than two parameter for events like the following? Event: Onbutton_click(object sender, EventArgs e)" Event handler: button.Click += new...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.