how to make popups from applet... - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

how to make popups from applet...

big_pilbig_pil Posts: 14Member
Hi.. if I have an Applet, and I want to have a hidden function in the applet, id I push for ex. control shift D, I will get a popup from the applet, there I can feed some data inside sometextarea, and then it will return the data to the applet there I can do something with it..
how to do that ?
how to make popups from applet.
if you want, e-mail me to [email protected]
thanx

Comments

  • zibadianzibadian Posts: 6,349Member
    : Hi.. if I have an Applet, and I want to have a hidden function in the applet, id I push for ex. control shift D, I will get a popup from the applet, there I can feed some data inside sometextarea, and then it will return the data to the applet there I can do something with it..
    : how to do that ?
    : how to make popups from applet.
    : if you want, e-mail me to [email protected]
    : thanx
    :
    Extend an awt.Window or swing.JFrame to make the popup window. Then in your code detect the ctrl-shift-D using either a hidden menu item or some key-preview code, and show your extended window (or JFrame).
    As for using the data. As long as the window exists all the controls inside it exist. It is best to write access methods in the window for the various controls.
  • big_pilbig_pil Posts: 14Member
    : : Hi.. if I have an Applet, and I want to have a hidden function in the applet, id I push for ex. control shift D, I will get a popup from the applet, there I can feed some data inside sometextarea, and then it will return the data to the applet there I can do something with it..
    : : how to do that ?
    : : how to make popups from applet.
    : : if you want, e-mail me to [email protected]
    : : thanx
    : :
    : Extend an awt.Window or swing.JFrame to make the popup window. Then in your code detect the ctrl-shift-D using either a hidden menu item or some key-preview code, and show your extended window (or JFrame).
    : As for using the data. As long as the window exists all the controls inside it exist. It is best to write access methods in the window for the various controls.
    :



    will you please make a litle example for me ?
    I want it to be a regular applet, no jframes or something like tat for a begginer.
    thanx
  • zibadianzibadian Posts: 6,349Member
    : : : Hi.. if I have an Applet, and I want to have a hidden function in the applet, id I push for ex. control shift D, I will get a popup from the applet, there I can feed some data inside sometextarea, and then it will return the data to the applet there I can do something with it..
    : : : how to do that ?
    : : : how to make popups from applet.
    : : : if you want, e-mail me to [email protected]
    : : : thanx
    : : :
    : : Extend an awt.Window or swing.JFrame to make the popup window. Then in your code detect the ctrl-shift-D using either a hidden menu item or some key-preview code, and show your extended window (or JFrame).
    : : As for using the data. As long as the window exists all the controls inside it exist. It is best to write access methods in the window for the various controls.
    : :
    :
    :
    :
    : will you please make a litle example for me ?
    : I want it to be a regular applet, no jframes or something like tat for a begginer.
    : thanx
    :
    Here's a simple window using the AWT components:
    [code]
    class HelloWorldPopup extends Frame {

    public HelloWorldPopup() {
    add(new Label('Hello World!'));
    setSize(400, 200);
    }
    }
    [/code]
    And here's the code to show it:
    [code]
    HelloWorldPopup popup = new HelloWorldPopup();
    popup.setVisible(true);
    [/code]
    As you can see it is very similar to making an applet. The only differences are the ancestor (Frame instread of Applet) and that you need to specify the size.
Sign In or Register to comment.