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 5850625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T13:10:00+00:00 2026-05-22T13:10:00+00:00

I have a game application that I will be running in a web browser

  • 0

I have a game application that I will be running in a web browser using the tag.
This program has a JFrame, which displays a couple of tabs allowing navigation throughout the program.
When I run the program locally it will work fine, displaying the JFrame and working in entirety.
However when I upload it to the host and visit it’s link the JFrame will not display..

I have searched about 3 hours and simply must not be able to provide the correct keywords for my siutation.
All I can get in results is the JFrame not appearing at all, locally or web app.

This is how the client looks when I run it locally from the same .jar:

Picture - Local

This is how the client looks in a web browser (tried IE, FF and Chrome):

Picture - Web

Applet.java:

public class Client extends RSApplet {

    public static void main(String args[]) {
        try {
            instance = new Client();
            new UserInterface(args);
        } catch(Exception e) {
            e.printStackTrace();
        }
    }

}

GUI.java

public class GUI extends Applet implements ActionListener, WindowListener, FocusListener {

    public UserInterface(String args[]) {
        try {
        /* ------------------------------------------------------------------------ */
        /* Metal                                                                    */
        /*  UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");    */
        /* System Look                                                              */
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        /* ------------------------------------------------------------------------ */
            initGUI();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

    public void initGUI() {
        try {
            JFrame.setDefaultLookAndFeelDecorated(true);
            JPopupMenu.setDefaultLightWeightPopupEnabled(false);
            frame = new JFrame(frameTitle);
            frame.setLayout(new BorderLayout());
            Image icon = Toolkit.getDefaultToolkit().getImage(iconDir);
            frame.setIconImage(icon);
            gamePanel = new JPanel();
            gamePanel.setLayout(new BorderLayout());
            gamePanel.add(this);
            gamePanel.setPreferredSize(new Dimension(850, 600));
            frame.getContentPane().add(gamePanel, BorderLayout.CENTER);
            frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
            frame.addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    if (loggedIn == false) {
                        System.exit(0);
                    } else {
                        if (showMessage("Are you sure you want to close the game?") == true) {
                            System.exit(0);
                        } else return;
                    }
                }
            });
            initMenuBar();
            frame.pack();
            frame.setVisible(true);
            frame.setResizable(true);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void initMenuBar() {
        menuBar = new JMenuBar();
        /** File **/
        fileMenu = new JMenu("File");
        String[] fileMenuItems = {
            "Quit"
        };
        menuBar.add(fileMenu);
        /** Quick Links **/
        linksMenu = new JMenu("Quick Links");
        String[] linksMenuItems = {
            "Home", "News", "Donate"
        };
        menuBar.add(linksMenu);
        frame.getContentPane().add(menuBar, BorderLayout.NORTH);
    }

}
  • 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-05-22T13:10:01+00:00Added an answer on May 22, 2026 at 1:10 pm

    Are you trying to put the application on a web page, i mean to run as a web application. If yes then you want an Applet or JApplet and not a frame. A frame works normally but for you to add it to a website then you need to make it an applet. Make use of the links below..

    JApplet class for se6- http://download.oracle.com/javase/6/docs/api/javax/swing/JApplet.html
    JApplet/Applet tutorial — http://download.oracle.com/javase/tutorial/uiswing/components/applet.html

    Good Luck

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

Sidebar

Related Questions

I have an application that tracks high scores in a game. I have a
I have an game application I have written for Windows Mobile and I want
I have a game in which you can score from -40 to +40 on
I have written a game that uses GLUT, OpenGL and FMOD. The problem is
I have my own game engine using C++ and OpenGL, but I have models
I have an OpenGL ES game that I am hacking together. One part of
Hey guys, I have a raidan style 2d flying/fighter game that im working on.
I have 3 tables that look something like this: Table1 Users: ID Name Score
I have a little game written in C#. It uses a database as back-end.
I have little knowledge of Flash but for a little Flash game I have

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.