Jump to content

Close a tab in Firefox from applet

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
brightmatter

brightmatter

    Learning Programmer

  • Members
  • PipPipPip
  • 36 posts
I want to make a button to cleanly end my applet and close the tab it is in. I am running the applet in firefox and I am currently using a method as follows at the end of the text. You will notice that its body is empty. This is because I have no idea what to put in here. I thought maybe System.exit but that was clearly too simple and it did not work. Does anyone know how to do what I want?

[code]
private void killAppletCloseTab(java.awt.event.ActionEvent evt) {
}
[\code]

Thanks,

bm

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
This may not be possible. Java applets have some fairly stringent limitations on what they can do, and issuing commands back to the browser they are running in may be one of them.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
morefood2001

morefood2001

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,720 posts
Java applets have very limited functionality in issuing commands back to the browser. You may however be able to export commands to JavaScript or a php script (I've created both types in the past) to create this behavior, but in Java itself, I don't think its possible.