how to make a java applet menu interact with jframe

Posted on 2009-12-16
Last Modified: 2013-11-23
hi mind me asking how to make a java applet menu that can call on different jframe window base on the parameter being passed ?
i ll really appreciate it if u can show me piece of code
Question by:emeraldpiggy
    LVL 5

    Expert Comment

    Sorry, can you tell me some more details? What do you want to see?

    Author Comment

    hi joseph
    i am trying to make a java applet menu and every button opens a same jframe panel with different content inside
    LVL 5

    Expert Comment

    Are you using Applet (AWT) or JApplet (Swing)?

    For Swing, you can try to include a JInternalFrame to your JApplet. The link below is a good tutorial with code examples. You may make use of the example and modify it to fit your needs.

    Author Comment

    Both awt and swing

    Accepted Solution

    hi joseph i am trying to pass the parameter from javaapplet to jframe

    can u enlighten me on this ?

    first i am going to change button to menu
    second passing the parameter thru actionListener  with constructor override
    		button = new JButton("go");
    		button.addActionListener(new ButtonListener());
    class ButtonListener implements ActionListener {
    	  ButtonListener() {}
    	  public void actionPerformed(ActionEvent e) {
    		    if (e.getActionCommand().equals("Play Chess")) {
    		    	JFrame jf = new JavaChess1();

    Open in new window


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Basics of Drool Rule Engine with few samples 2 31
    noX challenge 17 54
    countPairs challenge 7 39
    firstChar challenge 13 57
    Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
    How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from ( Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
    The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
    THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now