Comunication between applets (please help)

I have an applet that connects to a servlet, which connects to a database. Signing the applet made it possible to access it from client machines.
However, there is another applet (in the same html page), which receives a message from the first applet (the one that connects to the servlet). This applet only receives a vector of objects from the first applet, and is triggered by a message send.
The first applet is working fine. But when I click the button that orders the second applet to paint himself, nothing happens (the cursor remains in waiting state, and the second applet is never repainted).
If you didn't understand, please let me know, so that I'll try to explain better.
Thanks!

Sorry, I forgot to mention that the second applet (the one that receives the message from the first one) isn't signed.
I didn't do it because it doesn't make any connections or unsecure actions (except for receiving a message, but is this unsecure?).
Can someone tell me if that is the problem?

Similar Messages

  • Swing applet- please help

    Hi,
    I am still trying to make sense of the java code...
    I thought it should be easy to create an applet, but I don't know what is wrong.
    Could anyone help me debugging it?
    Here is the code and the error msg:
    package BrImage;
    /* Example 16-3 An Image Previewer Accessory implements BrImagFile*/
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.beans.*;
    import java.io.*;
    import java.applet.Applet;
    public class BrImage extends JApplet {
    public void init() {
    getContentPane().add(new JLabel("JAppletSwing!"));
    public class BrImagFile extends javax.swing.JFrame {
    JFileChooser chooser = new JFileChooser();
    ImagePreviewer previewer = new ImagePreviewer();
    PreviewPanel previewPanel = new PreviewPanel();
    class PreviewPanel extends javax.swing.JPanel {
    public PreviewPanel() {
    JLabel label = new JLabel("Image Previewer",SwingConstants.CENTER);
    setPreferredSize(new Dimension(150,0));
    setBorder(BorderFactory.createEtchedBorder());
    setLayout(new BorderLayout());
    label.setBorder(BorderFactory.createEtchedBorder());
    add(label, BorderLayout.NORTH);
    add(previewer, BorderLayout.CENTER);
    public BrImagFile() {
    super("Image Previewer");
    Container contentPane = getContentPane();
    JButton button = new JButton("Select A File");
    contentPane.setLayout(new FlowLayout());
    contentPane.add(button);
    chooser.setAccessory(previewPanel);
    button.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    int state = chooser.showOpenDialog(null);
    File file = chooser.getSelectedFile();
    String s = "CANCELED";
    if(file != null && state == JFileChooser.APPROVE_OPTION) {
    s = "File Selected: " + file.getPath();
    /* needs to open file on the right html */
    JOptionPane.showMessageDialog(null, s);
    chooser.setFileFilter(new ImageFilter()); /*test filter */
    chooser.addPropertyChangeListener(
    new PropertyChangeListener() {
    public void propertyChange(PropertyChangeEvent e) {
    if(e.getPropertyName().equals(
    JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) {
    File f = (File)e.getNewValue();
    String s = f.getPath(), suffix = null;
    int i = s.lastIndexOf('.');
    if(i > 0 && i < s.length() - 1)
    suffix = s.substring(i+1).toLowerCase();
    if(suffix.equals("gif") ||
    suffix.equals("jpg") ||
    suffix.equals("bmp"))
    previewer.configure(f);
    class ImagePreviewer extends javax.swing.JLabel {
    public void configure(File f) {
    Dimension size = getSize();
    Insets insets = getInsets();
    ImageIcon icon = new ImageIcon(f.getPath());
    setIcon(new ImageIcon(icon.getImage().getScaledInstance(
    size.width - insets.left - insets.right,
    size.height - insets.top - insets.bottom,
    Image.SCALE_SMOOTH)));
    class ImageFilter extends javax.swing.filechooser.FileFilter {
    public boolean accept(File f) {
    boolean accept = f.isDirectory();
    if( ! accept) {
    String suffix = getSuffix(f);
    if(suffix != null)
    accept = suffix.equals("jpg") ||
    suffix.equals("gif") ||
    suffix.equals("bmp");
    return accept;
    public String getDescription() {
    return "Image Files(*.gif *.jpg *.bmp)";
    private String getSuffix(File f) {
    String s = f.getPath(), suffix = null;
    int i = s.lastIndexOf('.');
    if(i > 0 && i < s.length() - 1)
    suffix = s.substring(i+1).toLowerCase();
    return suffix;
    public static void main(String a[]) {
    JApplet applet = new BrImage();
    JFrame f = new BrImagFile();
    f.setBounds(300, 300, 300, 75);
    applet.init();
    applet.start();
    f.setVisible(true);
    /* f.setDefaultCloseOperation(
    WindowConstants.DISPOSE_ON_CLOSE); */
    f.addWindowListener(new WindowAdapter() {
    public void windowClosed(WindowEvent e) {
    System.exit(0);
    BrImage/BrImage.java [109:1] non-static variable this cannot be referenced from a static context
    JFrame f = new BrImagFile();
    ^
    1 error
    Errors compiling BrImage.

    Hi again,
    Please help.
    JL

  • Problem to debug applet, please help...

    i use windows.
    there are 3 files under "c:\current" directory, they are
    file 1. mem_appletviewer.bat - with content:
    "e:\install\java\jdk1.3.1_05\bin\appletviewer" -J-Xdebug -J-Xrunjdwp:transport=dt_shmem,address=conn001122,server=y,suspend=y test.htm
    file 2. mem_jdb.bat - with content:
    "e:\install\java\jdk1.3.1_05\bin\jdb" -attach conn001122
    file 3. test.htm - with applet tag:
    <applet
    code="Let0.class"
    codebase="G:\Victor\Vc5060\Develop\JCity\files\RecentFile"
    width=400 height=250 ></applet>
    (Let0.class is a simplest class extends Applet)
    please note, codebase is not "c:\current" directory
    problems happend when i debug: (run mem_appletviewer.bat first then mem_jdb.bat)
    a) if move Let0.class to "c:\current" directory, debug is fine but test.htm can not load Let0.class itself because of codebase tag.
    b) if move Let0.class to codebase directory (G:\Victor\Vc5060\Develop\JCity\files\RecentFile), test.htm can load the class but appletviewer can not load the class (can not find Let0.class).
    ===========================================================
    in my application, i need to put Let0.class in codebase directory.
    Question:
    1) how to set -classpath for appletviewer (as debug application class in java.exe )? is it possible?
    2) codebase TAG in test.htm doesn't work for appletviewer, what is problem? how to fix it?
    totally:
    how to debug Let0.class if it is in codebase directory (not in "c:\current")?
    thx

    i fix it.

  • AP Express wont share connection between computers PLEASE HELP!

    I have a powerbook G4 connected to a wireless network I have created. I can connect to the internet wirelessly through the airport, but when other other computers try to join they are brought to the sign in page of my ISP. Previously, I had the airport set up so as long as one computer had signed into my ISP all the other computers could share this connection. How do I change the settings on my airport to get this working again? Basically, it seems like all the computers can join the network no problem, but since my ISP only allows one user to log in at once only one computer can access the internet and the other computers are stuck on the sign in page. Ive tried changing the settings in the airport utility to distribute ISP addresses, but when I restart the airport none of the computers will connect to the internet. Can someone please help???

    Ive tried
    changing the settings in the airport utility to
    distribute ISP addresses, but when I restart the
    airport none of the computers will connect to the
    internet.
    You need to have the Airport distribute IP addresses via NAT sharing the single address which your ISP gives you. As this is not configured then you will experience the sign in page problem you are having.
    Configure the Airport to distribute IP addresses, restart.
    Once it has restarted, see if a computer can connect to the internet.
    If not in a browser try http://17.254.0.91
    and report back.
    iFelix

  • I want to create an applet, Please Help...

    HI all,
    I want to create an applet which should be able to display text and images...
    To display text in an applet I am using ...
    import java.awt.*;
    import java.applet.*;
    public class SimpleApplet extends Applet
        public void paint(Graphics g)
            g.drawString("A Simple Applet", 20, 20);
    }Now If I want to create few operators in a different class, and i want to use it from the SimpleApplet class what should be doing.

    HI all,
    I am creating an Gui: The code is here:
    import javax.swing.*;
    import java.awt.*;
    public class Tab extends JFrame
        JPanel p,p1,p2,p3,p4,p5;
        Frame f1,f2,f3;
        JTabbedPane tpane;
        public Tab()
            p = new JPanel();
            p1 = new JPanel();
            p2 = new JPanel();
            p3 = new JPanel();
            p4 = new JPanel();
            p5 = new JPanel();
            tpane = new JTabbedPane();
            p.setLayout(new GridLayout(1,1));
            tpane.addTab("File",p1);
            tpane.addTab("Edit",p2);
            tpane.addTab("Document",p3);
            tpane.addTab("View",p4);
            tpane.addTab("Help",p5);
            p.add(tpane);
            getContentPane().add(p);
            setVisible(true);
        public static void main(String[] args)
            // TODO Auto-generated method stub
            Tab t = new Tab();
    }I want to diaplay some text in the main area left. What should I do.
    How to add the Text.

  • Error when trying to sign the Applet, please Help

    Hello,
    I have this Error when I am trying to sign my applet, after execut this command :
    jarsigner -verify -verbose -certs test.jar
    jarsigner: java.lang.SecurityException: invalid SHA1 signature file digest for classe/JDBC_SQL.class
    And for your information, that I had add the JDBC_SQL.class to the jar file (test.jar) because I made some change to the file JDBC_SQL.java
    so please if you know what can I do to resolve my problem
    Thank you to reponse !
    rania +

    ahh, here is a problem. u made changes to the JDBC_SQL.java and packed the jar file. u have to sign the jar file again.
    let me know if u need futher assistance

  • Air Drop and File Sharing Between Macs Please HELP

    I have a 2011 Mac Book Pro running Mavericks and a 2010 Mac Pro running mountain lion and I am having trouble air Dropping and file sharing between them.
    My MBP works fine. It can see other macs and share with them on my home network. My MP on the other hand cant see any other computers under the shared devices location in my finder. I have turned on file sharing for my MP as well as screen sharing. Neither works. My Mp used to be able to Air Drop and File share.
    When I try to Air Drop to my MP it wont receive the item.
    Has someone been through this before and know how to fix the issue? Ive been trying to research this for a while and haven't been able to find a solution.
    Any help would be great!
    Thanks

    Are you using a frieWall on individual Macs?
    If you are using a Router you control, individual computer FireWalls are not needed.

  • There are some space between paths, please help me to solve this

    Hello everyone, i've little question about paths. I get this problem everytime, i searched and didn't find answer.
    There are some space between two different colored paths. There is image below to show the problem more open.
    Thanks for helping.

    sscayir,
    It looks like the screen artifact/Anti-Aliasing issue so often discussed here.
    You may get rid of it by unticking Anti-Aliased Artwork in Edit>Preferences>General, and see more pixelation on screen, but you will probably find that the artifact remains at the same size when you zoom in and that it will not show in PDFs, print, and raster images created by exporting or Save for Web; and yet again, it may be a real issue.
    Which is it?

  • APPLETS PLEASE HELP !!!!!!

    Does anyone know how to close an applet dynamically from within its own code.
    Have tried via javascript but the applet I created using the object tag fails to communicate correctly. Says 'Object does not support this operation'.
    If anyone can help I would be grateful as this is a major issue now.
    Thanks Andrew Mercer

    Thankyou very much for your help.
    I can now use java code from an applet to close the window that surrounds this applet.
    However I still have one problem that I cannot solve by looking through the documentation.
    My applet basically is used to copy files from server to client cache. Once each file is fully copied over then the applet has done its job and can be closed.
    The main Browser window stays open all this time and each applet window is opened and file transfered by hitting a link on this window from a list of links that can run into 100's.
    The first time this operation is requested the JSObject.getWindow(this) call returns a valid reference to the applet within the window.
    Once the first window is closed the next JSOBject.getWindow(this) fails, in fact it goes no further and does not return an exception or suitable message.
    This happens even if I have closed the window manually.
    How can I use the getWindow(this) call for subsequent windows?
    Depending where I put the getWindow(this) I can actually make the applet init operation stall and go no further.
    Thanks again.
    Andrew Mercer

  • Sending emails from inside an applet (Please help!)

    Hi all!
    I�d like to send an email from inside the applet. For this reason I need to get the Systemproperties, don't I ?
    Properties props = System.getProperties();
    props.put("mail.smtp.host", mailhost);
    ... and set the mail.smtp.host Property my smtp-host.
    But as I try to get the systemproperties from the applet, I get the exception:
    com.ms.security.SecurityExceptionEx[Sendmsg.<init>]: Unable to access system properties.
    Can somebody tell me, how I can solve this problem? Which properties are needed to send mails?
    Does it work, if I just create my Properties, and set only the smtp.host?
    As I continued my experiments, I realised that it is not only the mail.smtp.host property, that is needed by the applet, but java.home, and many more...
    So is it possible to send emails in this form at all??
    Pleeaaaase help, I have to hand in my project very soon!
    Thanks a lot,
    Gabor

    I've found a site about signing:
    http://www.suitable.com/Doc_CodeSigning.shtml
    I think you can read german, therefore the german newsgroup de.comp.lang.java is a good point to search. Use http://groups.google.com to search the group.
    Uwe

  • Random white screen when trying to run applet (Please help)

    We have been plagued by this problem for months. We are running a Java applet (that we wrote) requiring JRE 1.3.0_01, where the html file has been created with html converter. RANDOMLY, when loading the applet, the applet will come up (we spawn a new browser window for it) and we will get a blank white screen, AND netscape will freeze, needing to be terminated. Saying program is not responding when you click the X.
    This is not a multithreaded program.
    I have also tried the new JRE 1.4 with the same problems.
    The strange thing is, we have found some workarounds.... if you tell your plugin to show the java console all the time, it takes care of majority of the crashes, but the applet STILL does the same thing every once in awhile. If someone can tell me what the problem is here I will be eternally grateful!!
    Steve

    I had the same problem at one time during the development of my applets. Without more details from you, there is no way to know the exact cause but I can give you some ideas:
    1) painting problems
    2) null pointer problems
    3) improper setup of the HTML file (this was the culprit for us...double check EVERYTHING)

  • Saving data with applets please help

    Hello,
    I want to save some variables, so the user of the applet have his last configuration at the start of the applet.
    What can i use? Do i have to give the permission at the applet of writing and reading files on the user disc (how do i make that for ie, netscape or mozilla)
    Or it is possible to use cookies in my applet???
    Thanks a lot.

    Actually we had some luck using the server to store a cookie in the browser, in your case it could be size and position. Then when the web page with the applet is requested you can create the html page on the fly and include the values as applet parameters.
    Another approach is to have the server store the cookie information via a cgi-bin script or servlet, and have the applet ask for it via a cgi-bin script or servlet when it starts up.

  • Drag&Drop between applications --- PLEASE HELP!

    Hi,
    I am trying to write two programs that will share the data using the system clipboard. When I start dragging an object in App A, it posts data in two format, one in XML format, the other one is just an URL into the system clipboard. When I drop the data to App B, it should read the system clipboard, and just use the XML format. When I drop the data into MSWord, it should use the URL format.
    I defined two DataFlavors:
    DataFlavor xmlFlavor = new DataFlavor("text/xml", "xml flavor");
    DataFlavor urlFlavor = DataFlavor.stringFlavor;
    Both App A and App B use MyTransferable, a subclass of Transferable.
    But when I drop the data to App B, it always throws UnsupportedFlavorException for "xml flavor".
    Has anyone done similar thing or know how I can achieve what I want to do here?
    Thank you very much for your help!!!
    Page

    You insert the DVD into the mac and restart as usual but while holding down the 'C'' key on the keyboard.
    This will boot the Mac from the DVD, not the installed OS. When you get to a desktop, find the Disk Utility (I can't remember where it is, somewhere in the menu bar menus) and open it. Click on the internal hard disk in the left hand column of the Disk Utilitiy window and choose 'repair disk'.

  • Passing object between dialogs. please help

    I have a panel which displays student's info.
    There is a button called "Create New Student"
    When the button is clicked, a new Dialog will shows up, where users can enter basic info for new student.
    My question is, after a user finish entering data for new student, a new Student Object will be created.
    How do I pass this Student Object back to original frame?
    The basic question would be how do I pass object from a Dialog to its' caller Panel.
    Thanks

    Put your Student object in global scope or in sucha
    scope that both the dialog boxes can access it!
    That is not a good idea. I think there is some misunderstanding here.
    Putting Student object at global scope has nothing to
    do with encapsulation. Furthermore, it is a
    requirement! In OP's main panel he/she needs
    reference to Student object. In Student
    creation dialog, we need to create a new
    Student. These two requirements necessitate the
    accesibility of Student class.Yes, they both need to see the class. But it would be a bad idea to make the object that is in the main panel a global variable for the dialog to update.

  • HT5631 how do I verify my apple id? I can't sign in to it in mail and I can't make a new one because it just will not process I'm trying to set up iCloud between iPad and iPhone and having ALOT of difficulty pleAse help need it done by later on today!!!!!

    how do I verify my apple id? I can't sign in to it in mail and I can't make a new one because it just will not process I'm trying to set up iCloud between iPad and iPhone and having ALOT of difficulty pleAse help need it done by later on today!!!!!

    In order to use your Apple ID to create an iCloud account, the primary email address associated with the ID must first be verified.  To do this, Apple will send a verification email to your account and you must respond to the email by clicking the Verify Now link.  Make sure you are check the spam/junk folder as well as the inbox.  If it isn't there, go to https://appleid.apple.com, click Manage your Apple ID, sign in, click on Name, ID and Email addresses on the left, then to the right click Resend under your Primary Email Address to resend the verification email.

Maybe you are looking for

  • Do I have a problem.  My unit works, but not by the directions

    I may be an idiot. I opened my new nano (I got it from my brother) and saw on the side PC + Mac. Ok, I connected it and booted up into LINUX, that is installed on my PC. It is installed on my personal computer, or am I not too wise? So then I went th

  • Move Windows 7 boot disk to a new mac

    Hi, I am just in the middle of moving from a mac pro to a new iMac and need to move my windows 7 os as well. On the mac pro I have windows 7 on it's own 500gb sata drive and was wondering if I can just move this out and boot from it using a Sata crad

  • Delivery Output type newly created not triggering

    Hi, I have created 2 new output types i;e 1 for returns Order and one when we save the Delivery order. This i have copied the standard output type (BA00 & LD00). so now in returns order the output type i want to trigger automatically and print. But i

  • Integrating a workflow in PS Elements 5, LR1 and Photoshop

    Here is a workflow that helps me integrate LR, Elements 5 and Photoshop... Prior to release of LR1, I used PS Elements 5 to organize my photos, along with RawShooter and PS7.0. I had hoped to replace both PS Elements and RawShooter by Lightroom - but

  • New Itunes update causing Ipod crashes

    Since installing 10.6, Itunes has now regularly crashed when my Ipod is plugged in, leading me to have to force quit after giving it ample time to right itself (which it never does). This of course has wiped my ipod down, even tho DiskWarrior and Dis