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

  • Home
  • SEARCH
  • 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 8624317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:29:54+00:00 2026-06-12T07:29:54+00:00

This program should display 1 normal button (a) and 3 radio buttons (x,z,y). When

  • 0

This program should display 1 normal button (a) and 3 radio buttons (x,z,y). When the user selects one radio button and press the button a, it should redirects him to a website. The problem is during the launch. The window is empty, and in the bottom left there’s a message saying “Start: Applet Not Initialized”. Also, I get “java.lang.InstantiationException” in the console.

I’ll be grateful for any help.

package nome.nonoriginale;

import java.awt.Button;
import java.awt.Checkbox;
import java.awt.event.ActionListener;
import java.net.MalformedURLException;
import java.net.URL;

import javax.swing.JApplet;

import com.sun.corba.se.spi.orbutil.fsm.Action;

public abstract class Linkers extends JApplet implements ActionListener
{
Button a = new Button("Go to");

URL libro1;
URL libro2;
URL libro3;

Checkbox x;
Checkbox z;
Checkbox y;

public void init()
{
    try
    {
        libro1 = new URL("http://www.reddit.com/");
        libro2 = new URL("http://www.youtube.com/");
        libro3 = new URL("http://www.ismatteirecanati.it/default.aspx?pag=0&lang=it");
    }
    catch(MalformedURLException e)
    {
        System.out.println("Link's broken, brah");
    }
    add(a);
    add(x);
    add(z);
    add(y);

    a.addActionListener(this);
}

public void ActionPerformed(Action e)
{   
    if(x.getState() == true)
        getAppletContext().showDocument(libro1);

    else if(y.getState() == true)
        getAppletContext().showDocument(libro2);

    else if(z.getState() == true)
        getAppletContext().showDocument(libro3);
}

}
  • 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-12T07:29:56+00:00Added an answer on June 12, 2026 at 7:29 am

    The class can’t be instantiated as it is declared abstract. You need to remove the abstract keyword from the class declaration:

    public class Linkers extends JApplet implements ActionListener
    

    Aside from that, you can implement ActionListener by implementing:

    public void actionPerformed(ActionEvent e) {
    

    It looks like you have imported a CORBA Action class by mistake.

    Once these changes are made you wil get a NullPointerException as your checkboxes are not instantiated.

    Don’t mix AWT with Swing components—AWT are heavyweight and will adversely affect the drawing of Swing components.

    so you could use:

    JCheckBox x = new JCheckBox();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I write a program to verify this website: www.alipay.com which root CA cert should
This program should calculate the value of 2^1+2^2 + ... + 2^10: #include <stdio.h>
I have this program that should execute a piece of code base on the
I am working on a bug in this program where it should be able
I have this program in Python which should save text files to a folder
Edited Question: This should be clear. using System; namespace UpdateDateTimeFields { class Program {
Dear all,Now i have this question in my java program,I think it should be
My program should be able to work this way. Below is the content of
I have a program in php that should display the random images without repetition,I
This program should check whether the value of getTotalCount() is greater thana a number

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.