Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8420585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:54:57+00:00 2026-06-10T02:54:57+00:00

I wanna know that how to call JFrame from jsp. When I click button

  • 0

I wanna know that how to call JFrame from jsp.
When I click button on the browser, I want to call frame.
But I do not know how to do.
If you don’t mine, please explain me.

Here is some code!

package testing;

import javax.swing.JPanel;
import javax.swing.JApplet;
import javax.swing.JList;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.security.Key;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.UnrecoverableKeyException;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.Enumeration;
import java.util.Vector;

import javax.swing.JLabel;
import javax.swing.JPasswordField;
import javax.swing.JButton;

public class LoadFile extends JApplet implements ActionListener{

    private JPanel jContentPane = null;
    private JList listCertificate = null;
    private JLabel jLabel = null;
    private JPasswordField password = null;
    private JButton btnLoad = null;
    private JLabel jLabel1 = null;

    /**
     * This is the xxx default constructor
     */
    public LoadFile() {
        super();
    }

    /**
     * This method initializes this
     * 
     * @return void
     */
    public void init() {
        this.setSize(400, 306);
        this.setContentPane(getJContentPane());
    }

    /**
     * This method initializes jContentPane
     * 
     * @return javax.swing.JPanel
     */
    private JPanel getJContentPane() {
        if (jContentPane == null) {
            jLabel1 = new JLabel();
            jLabel1.setBounds(new Rectangle(28, 19, 296, 30));
            jLabel1.setText("Choose your certificate");
            jLabel = new JLabel();
            jLabel.setBounds(new Rectangle(54, 228, 88, 26));
            jLabel.setText("Password");
            jContentPane = new JPanel();
            jContentPane.setLayout(null);
            jContentPane.add(getListCertificate(), null);
            jContentPane.add(jLabel, null);
            jContentPane.add(getPassword(), null);
            jContentPane.add(getBtnLoad(), null);
            jContentPane.add(jLabel1, null);
        }
        return jContentPane;
    }

    /**
     * This method initializes listCertificate  
     *  
     * @return javax.swing.JList    
     */
    private JList getListCertificate() {
        if (listCertificate == null) {
            listCertificate = new JList();
            listCertificate.setBounds(new Rectangle(26, 56, 345, 149));
            Vector<String> alias = getAlias();
            listCertificate.setListData(alias);
        }
        return listCertificate;
    }

    /**
     * This method initializes password 
     *  
     * @return javax.swing.JPasswordField   
     */
    private JPasswordField getPassword() {
        if (password == null) {
            password = new JPasswordField();
            password.setBounds(new Rectangle(152, 224, 171, 28));
        }
        return password;
    }

    /**
     * This method initializes btnLoad  
     *  
     * @return javax.swing.JButton  
     */
    private JButton getBtnLoad() {
        if (btnLoad == null) {
            btnLoad = new JButton();
            btnLoad.setBounds(new Rectangle(189, 261, 70, 30));
            btnLoad.setText("Load");
            btnLoad.addActionListener(this);
        }
        return btnLoad;
    }


    public Vector<String> getAlias(){
        Vector<String> str = new Vector<String>();
        KeyStore ks;
        try {
            ks = KeyStore.getInstance("Windows-MY");
            ks.load(null, null);
            Enumeration en = ks.aliases();
            String aliasName = "";
            while (en.hasMoreElements()) {
                aliasName = (String) en.nextElement();
                str.add(aliasName);
            }

        } catch (KeyStoreException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (NoSuchAlgorithmException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (CertificateException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return str;
    }

    @Override
    public void actionPerformed(ActionEvent arg0) {
        // TODO Auto-generated method stub
        Object obj = arg0.getSource();
        if(obj == btnLoad){
            String alias = (String)getListCertificate().getSelectedValue();
            String password = getPassword().getText();

        }
    }

}  //  @jve:decl-index=0:visual-constraint="294,19"

I want to call that class from JSP.
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T02:54:58+00:00Added an answer on June 10, 2026 at 2:54 am

    When I click button on the browser, I want to call frame.

    Launch the frame directly from an HTML link (or button) using Java Web Start.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We've recently upgraded Rails to 2.3.8 (from something so ancient you don't wanna know).
Call me crazy... Hey i wanna know that how you people comment or ask
I know that when I'm using BufferedImage I can call BufferedImage.getColorModel() but how can
I wanna know that how we can identify whether a page is redirecting to
Hi guys i am going to make a android game. i wanna know that
I am developing a software with vb6.0 :( . I wanna to know that
This question is not language-aware. I wanna know how can I recognize a returning
As mentioned in title. I wanna know that does SQL Server can partially execute
just for knowledge sake, i wanna know that how good is to use a
I know I asked these question before but I did not get the right

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.