Hello
I am developing a java application and trying to listen to mac events using the com.mac.eawt.ApplicationListener.
I was able to listen to all the events such as handleAbout, handleQuit, etc.. However the the handleOpenFile event never seems to get called when double-clicking on a file that is associated with my application. The application opens but the handleOpenFile doesn't get called.
I read a few posting regarding this problem and couldn't find an answer to my problem.
This is my environment
Java 1.5.0_06
Mac OSX 10.4.8 800 Mhz PowerPC G3 640 Mb
Basically, this is the way that I'm implementing the ApplicationListener
public class MainFrame extends JFrame implements ApplicationListener
public MainFrame()
{
super();
Application app = new com.apple.eawt.Application();
app.addApplicationListener(this);
// note that instead of creating a new application, I also tried Application.getApplication(), it didn't work either
// I also tried to extend to have a class that extends the Application directly and was not succesful either
}
public void handleAbout(ActionEvent e)
{
System.out.println("Handle About");
}
public void handleOpenApplication(ActionEvent e)
{
System.out.println("Handle OpenApplication");
}
public void handleOpenFile(ActionEvent e)
{
System.out.println("Handle OpenFile");
}
public void handleQuit(ActionEvent e)
{
System.out.println("Handle Quit");
}
// + ... + (empty declaration for other handle ActionEvent methods)
The application was packaged using JarBundler to created a dmg file.
Any help would be greatly appreciated.. Thanks!
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden