I need help putting my appet on the web. I keep getting an error. Thanks

This is my code. It works as a .jar but i need it to run from the web. I posted the code and my errors. Please help if possible. I know the coding is quite messy but there are reasons for the mess. Please let me know what I'm doing wrong.
This is the main class
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class testGUI2 extends JApplet
testGUI2 t;
     //ALL OF THE QUESTIONS
     public testGUI2()
     {createGUI();
          /*try {
                      SwingUtilities.invokeAndWait(new Runnable() {
                          public void run() {
                              createGUI();
                  } catch (Exception e) {
                      System.err.println("createGUI didn't complete successfully");
     }// end constructor main
     public  void createGUI()
          gameFrame g = new gameFrame();
          g.setOpaque(true);
          setContentPane(g);
          //JFrame testframe = new JFrame();
          //testframe.add(g);
          //testframe.setSize(500,500);
          //testframe.setVisible(true);
     public static void main(String[] args)
          testGUI2 t = new testGUI2();
          t.setSize(700,700);
     }//end main
}//end class

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class gameFrame extends JPanel{
     private gameFrame gframe;
     private JLabel title, opLabel,scoreLabel,numberLabel;
     private JButton helpButton,nextButton,playButton,newgameButton,startButton;
     private JRadioButton choiceOne, choiceTwo, choiceThree;
     testGUI2 t;
     private ButtonGroup bgroup;
     private int choicenumber;
     private int score;
     private int i;
     ButtonHandler handle = new ButtonHandler();
     String[] choice1 = new String [20];
     String[] choice2 = new String [20];
     String[] choice3 = new String [20];
     int [] answernum = new int[20];
     String[] audio = new String[20];
     public gameFrame()
          super( new FlowLayout());
     choice1[1]="Hey Steve";
     choice2[1]= "I figured that u needed this";
     choice3[1]= "To test your site";
     answernum[1]=1;
     //audio[1]= "C:/Users/Matt/Desktop/tests/gamesounds/chimes.wav";
     choice1[2]="So here it is";
     choice2[2]= "Im running out of test lyrics";
     choice3[2]= "So im just gonna put lines i think of from songs";
     answernum[2]=2;
     choice1[3]="Here goes";
     choice2[3]= "love electricity";
     choice3[3]= "shockwave central power on the motherboard, yes";
     answernum[3]=3;
     choice1[4]="push up overload legendary heavy glow";
     choice2[4]= "never again will i be dishonored";
     choice3[4]= "and never again will i be reminded";
     answernum[4]=1;
          choice1[5]="were living within the world of the jaded";
          choice2[5]= "they killed inspiration";
          choice3[5]= "its my obligation to never again";
          answernum[5]=2;
          choice1[6]="40 40 dollar to the man that wanna go";
          choice2[6]= "20 20 to the sister when u take it";
          choice3[6]= " at the grocery sto";
          answernum[6]=3;
          choice1[7]="this is as far as i probably need to go";
          choice2[7]= "any further and im past my test zone";
          choice3[7]= "terminate test here i think";
          answernum[7]=1;
          choice1[8]="what";
          choice2[8]= "who";
          choice3[8]= "why";
          answernum[8]=2;
          choice1[9]="what";
          choice2[9]= "who";
          choice3[9]= "why";
          answernum[9]=1;
          choice1[10]="what";
          choice2[10]= "who";
          choice3[10]= "why";
          answernum[10]=3;
          choice1[11]="what";
          choice2[11]= "who";
          choice3[11]= "why";
          answernum[11]=2;
               i=1;
               Icon start = new ImageIcon("gameimages/start.gif");
               Icon replay = new ImageIcon("gameimages/replay.gif");
Icon help = new ImageIcon("gameimages/althelp.gif");
Icon next = new ImageIcon("gameimages/altnext.gif");
Icon play = new ImageIcon("gameimages/altplay.gif");
startButton=new JButton(start);
startButton.addActionListener(handle);
startButton.setBorder(BorderFactory.createLineBorder(Color.black));
numberLabel= new JLabel("Question #:"+Integer.toString(i));
numberLabel.setFont(new Font("Times New Roman",Font.PLAIN,20));
numberLabel.setForeground(Color.white);
title=new JLabel("Lyrical Expert?",JLabel.CENTER);
title.setFont(new Font("Times New Roman",Font.BOLD,48));
title.setForeground(Color.white);
playButton=new JButton(play);//puttin image in
playButton.setBackground(Color.BLACK);
playButton.setSize(100,50);
playButton.setBorder(BorderFactory.createLineBorder(Color.gray));
newgameButton= new JButton(replay);
newgameButton.setVisible(false);
newgameButton.setBorder(BorderFactory.createLineBorder(Color.gray));
newgameButton.addActionListener(handle);
scoreLabel= new JLabel("Score:");
scoreLabel.setFont(new Font("Times New Roman",Font.PLAIN,20));
scoreLabel.setForeground(Color.white);
scoreLabel.setBackground(Color.BLACK);
opLabel= new JLabel("0");
opLabel.setFont(new Font("Times New Roman",Font.PLAIN,20));
opLabel.setForeground(Color.white);
opLabel.setBackground(Color.BLACK);
nextButton=new JButton(next);//puttin image in
nextButton.addActionListener(handle);
nextButton.setBackground(Color.BLACK);
nextButton.setSize(100,34);
nextButton.setBorder(BorderFactory.createLineBorder(Color.gray));
helpButton= new JButton(help);//puttin image in
helpButton.setSize(78,75);
helpButton.setBackground(Color.BLACK);
helpButton.setBorder(BorderFactory.createLineBorder(Color.black));
helpButton.addActionListener(handle);
bgroup=new ButtonGroup();
choiceOne= new JRadioButton("?");
choiceTwo= new JRadioButton("?");
choiceThree= new JRadioButton("?");
choiceOne.setFont(new Font("Times New Roman",Font.PLAIN,20));
choiceOne.setForeground(Color.white);
choiceOne.setBackground(Color.BLACK);
choiceTwo.setFont(new Font("Times New Roman",Font.PLAIN,20));
choiceTwo.setForeground(Color.white);
choiceTwo.setBackground(Color.BLACK);
choiceThree.setFont(new Font("Times New Roman",Font.PLAIN,20));
choiceThree.setForeground(Color.white);
choiceThree.setBackground(Color.BLACK);
choiceOne.addActionListener(handle);
choiceTwo.addActionListener(handle);
choiceThree.addActionListener(handle);
bgroup.add(choiceOne);
bgroup.add(choiceTwo);
bgroup.add(choiceThree);
choiceOne.setText(choice1[1]);
choiceTwo.setText(choice2[1]);
choiceThree.setText(choice3[1]);
//changeLayout();
               //gframe = new gameFrame();
               GroupLayout layout = new GroupLayout(this);
               this.setLayout(layout);
               this.setBackground(Color.BLACK);
               //layout.setAutoCreateGaps(true);
               //layout.setAutoCreateContainerGaps(true);
               layout.setVerticalGroup(
                    layout.createSequentialGroup()
                         .addComponent(title)
                              .addGap(10)
                              .addComponent(startButton)
                              .addComponent(playButton)
                              .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                                   .addGroup(layout.createSequentialGroup()
                                        .addComponent(choiceOne)
                                        .addComponent(choiceTwo)
                                        .addComponent(choiceThree))
                                        .addGap(50)
                                   .addComponent(nextButton))
                         //.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,50,50)
                         .addComponent(newgameButton)
                         .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                         .addComponent(helpButton)
                         .addGap(120)
                         .addComponent(numberLabel)
                         .addGap(120)
                         .addComponent(scoreLabel)
                         .addComponent(opLabel)));
               layout.setHorizontalGroup(
                    layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.CENTER)
                         .addGroup(layout.createParallelGroup(GroupLayout.Alignment.CENTER)
                         .addComponent(title)
                         .addGap(10)
                         .addComponent(startButton)
                         .addComponent(playButton))
                         .addGroup(layout.createSequentialGroup()
                              .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                                   .addComponent(choiceOne)
                                   .addComponent(choiceTwo)
                                   .addComponent(choiceThree))
                                   .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED,100,100)
                              .addComponent(nextButton))
                         .addComponent(newgameButton)
                              .addGroup(layout.createSequentialGroup()
                                   .addComponent(helpButton)
                                   .addGap(120)
                                   .addComponent(numberLabel)
                                   .addGap(120)
                                   .addComponent(scoreLabel)
                                   .addComponent(opLabel))));
          startButton.setVisible(true);
          nextButton.setVisible(false);
          playButton.setVisible(false);
          numberLabel.setVisible(false);
          scoreLabel.setVisible(false);
          opLabel.setVisible(false);
          choiceOne.setVisible(false);
          choiceTwo.setVisible(false);
          choiceThree.setVisible(false);
          }Edited by: Scubastevie on Jun 21, 2010 1:21 PM

Similar Messages

  • HT1386 i can't seem tp sync my old ipod touch to my new laptop. it says i need to upgrade my itunes on the ipod but i get an error. what do i do?

    i can't seem tp sync my old ipod touch to my new laptop. it says i need to upgrade my itunes on the ipod but i get an error. what do i do?

    Not good
    Error (-1)
    Try on another computer
    Also see:
    iOS: If you can't back up or restore from a backup in iTunes
    Then see:
    -1 error
    -1 error too
    If still problem  that means a hardware problem. In that case make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar

  • Microsoft office is installed on two user accounts. One account works fine, the other account keeps getting an error message. Why wont it work on both accounts?

    Microsoft office is installed on two user accounts. My husbands account works fine, but my account keeps getting an error message every time I try to open up a new document. Why wont it work on both accounts? How do I fix this?

    Hi Aubs,
    Without knowing what the error is, there's not much help we can provide....
    Cheers,
    GB

  • Need help putting a movie in the itunes

    I have no idea how to put the movie in the itunes. please help out the noob.

    There's an iPod 101 here if you want to find out the basics:
    http://www.apple.com/support/ipod101/
    Regards
    Colin R.

  • I need help with exporting project for the web

    Probably something i am doing wron g but here are the problems. When I use Quicktime Converter, if I try to convert to a Quicktime movie or an MPEG-4 nothing happens and i get a 'File error;File Unknown message' when i try to convert to an AVI File, it works, but even though I have already rendered the project, it shows up with little flashes of blue that say 'unrendered'. and finally, when I try to make it a w
    Windows Media File, it stops after 29 seconds. Any ideas?
    I have an iMac with dual core processor, and FCE HD 3.5.1. I have my video files on an external drive.
    iMac   Mac OS X (10.4.10)  

    perform a search using the term export for web and it should throw up some ideas.
    here's one for starters:
    http://discussions.apple.com/thread.jspa?messageID=2309121&#2309121
    If you're using flip4mac to convert to wmv, the trial stops at 30 seconds - you need at least wmvstudio to export to wmv:
    http://www.flip4mac.com/wmv.htm

  • HT1222 I am trying to do the update but keep getting an error. Is anyone else having problems?

    Can't get the 6.0.1 update to download and install.  Anyone else having problems?

    Everyone has that problem from time to time. And apple created that article where what you do depends on your error message.
    http://support.apple.com/kb/TS3694

  • HT201210 I keep getting unknown error 3 when trying to restore my Iphone.  On line and chat support won't accept my request as I can't open my phone to get the serial number

    this evening has been torturous My phone said I needed to restore thru Itunes/support
    I tried and keep getting UNKNOWN Error 3
    I tried to get support but I can't open my phone to get the serial number.
    Now WHAT????

    I was doing some research on this problem for a friend and came across your post and thought I should share this:
    https://discussions.apple.com/thread/5372052?start=30&tstart=0
    Hopefully it helps, good luck.

  • HT201413 i have tried resetting my iphone 4 but keep getting an error code at the end (34)

    I HAVE AN IPHONE 4, I HAVE TRIED RESETTING THE PHONE BUT KEEP GETTING AN ERROR CODE AT THE END OF THE RESET ie;34, ANY IDEAS PLEASE

    I'm not certain thats the problem. I stopped antivirus, I set screensaver to NOT trigger and yet it took me FOUR DAYS to completely sync my ipod touch. Stupid me decided to try it with the iPad and guess what...it's been three days and STILL timing out.
    I don't think Steve Jobs died; I think they upgraded him to iOS5, he crashed and they could not restore him.
    THIS UPGRADE *****. They rushed it out the door to get the fancy-dancy voice command thing on the iphones and yet that feature does not help ipod or ipad users.

  • I need help putting my printer together hp photosmart cn218a b210a how do u find a book on it

    i need help putting it together i had to take it apart there was dog food jammed in it the mice

    Here is a link for the manual.
    http://h10032.www1.hp.com/ctg/Manual/c02456532.pdf
    Here is another link for a video on putting the cartridges in.
    http://www.youtube.com/watch?v=gbZkq01F7do
    ""Click on the WHITE STAR if you would like to say THANKS""
    **Click the KUDOS star on the left to say 'Thanks'**
    Please mark a reply "ACCEPTED AS SOLUTION" if it solved your problem, so others can find it.

  • I want to add Narration to my movies. I've watched the Elements Guided Help for Narration. But when I click the RECORD Tab, I get an error message. "Your current audio hardware selection does not have any inout channels." My question, therefore: Do I need

    I want to add Narration to my movies. I've watched the Elements Guided Help for Narration, and closely followed their procedure. But when I click the RECORD tab, I get an error message. "Your current audio hardware selection dos not have any input channels." My question, therefore: Do I need to buy an external microphone? I have an HP Pavilion Laptop, running WIndows 8.1. I thought I had a built-in microphone. But ,maybe not. Please help. Also, WHAT KIND of microphone - exactly - should I buy? Thanks for your help.
    Mike Moore
    Corvallis, Oregon

    mikem
    Go to Edit Menu/Preferences/Audio Hardware and ASIO tab and click on it.
    Under the Input tab, make sure that you have your microphone selected.
    Please let us know the outcome.
    Thank you.
    ATR

  • After entering the redemption code from Adobe Photoshop CC, I keep getting an error saying "This card was purchased in a country that does not match your Adobe ID. You can try signing in with a different Adobe ID or get in touch with us if you need help."

    Hi. I'm a Mac user. After entering the redemption code from Adobe Photoshop CC, I keep getting an error saying "This card was purchased in a country that does not match your Adobe ID. You can try signing in with a different Adobe ID or get in touch with us if you need help." What should I do?

    Did you purchase the software in another country than where you live?

  • Hi i need help on BAPI to Update the ADRT & ADR6 tables

    hi,
    i need help on BAPI to Update the ADRT & ADR6 tables
    these are the fields to be updated
    ADRT-Remark Table
    ADR6-SMTP_ADDR
    ADR6-DFT_RECEIV
    Please guide me what parameters to be passed to update
    ADR6 & ADRT tables

    Look at this function Group
    <b>BUBA_3                         SAP BP: External BAPI Function Modules     </b>                        
    BAPI_BUPA_ADDRESS_ADD          SAP BP, BAPI: Add Address                                          
    BAPI_BUPA_ADDRESS_CHANGE       SAP BP, BAPI: Change Address                                       
    BAPI_BUPA_ADDRESS_GET_NUMBERS  SAP BP, BAPI: Read Address Numbers                                 
    BAPI_BUPA_ADDRESS_GETDETAIL    SAP BP, BAPI: Read Address                                         
    BAPI_BUPA_ADDRESS_REMOVE       SAP BP, BAPI: Delete Address                                       
    BAPI_BUPA_ADDRESSES_GET        SAP BP, BAPI: Determine All Addresses                              
    BAPI_BUPR_CONTP_ADDR_ADD       SAP BP, BAPI: Add Contact Person Relationship Address              
    BAPI_BUPR_CONTP_ADDR_CHANGE    SAP BP, BAPI: Change Contact Person Relationship Address           
    BAPI_BUPR_CONTP_ADDR_GETDETAIL SAP BP, BAPI: Read Contact Person Relationship Addresses           
    BAPI_BUPR_CONTP_ADDR_REMOVE    SAP BP, BAPI: Delete Contact Person Relationship Address           
    BAPI_BUPR_CONTP_ADDRESSES_GET  SAP BP, BAPI: Read Contact Person Relationship Addresses           
    BAPI_BUPR_EMPLO_ADDR_ADD       SAP BP, BAPI: Add Employee Relationship Address                    
    BAPI_BUPR_EMPLO_ADDR_CHANGE    SAP BP, BAPI: Change Employee Relationship Address                 
    BAPI_BUPR_EMPLO_ADDR_GETDETAIL SAP BP, BAPI: Read Employee Relationship Address                   
    BAPI_BUPR_EMPLO_ADDR_REMOVE    SAP BP, BAPI: Delete Employee Relationship Address                 
    BAPI_BUPR_EMPLO_ADDRESSES_GET  SAP BP, BAPI: Read Contact Person Relationship Addresses           
    Look also at OSS <a href="https://service.sap.com/sap/support/notes/306275">Note 306275 - Transferring address data</a>
    Regards

  • I need to update my InDesign but the screen just keeps on saying InDesign downloading now but nothing happens, HELP PLEASE

    I need to update my InDesign but the screen just keeps on saying InDesign downloading now but nothing happens, HELP PLEASE

    Nobody can tell you anything without proper system info or other technical details.
    Mylenium

  • Need help to log off iTunes - the tab with the current Apple-iD is "greyed" out.

    Need help to log off iTunes -> the tab with the current Apple-iD is "greyed" out. Can anyone help me?

    Do you have Restrictions turned on?

  • I purchased Creative Cloud through the Employee Purchase program. Had to reimage system. Need help reinstalling application. I have "redemption" code, but get error saying it has already been redeemed. Please advise.

    I purchased Creative Cloud through the Employee Purchase program. Had to reimage system. Need help reinstalling application. I have "redemption" code, but get error saying it has already been redeemed. Can you please advise how I go about getting my software reinstalled? If I was given the serial number when I redeemed, I don't have any record of it.
    Thank you,
    Starla

    Hi Starla Mehaffey,
    I would suggest you to sign in with your Adobe ID during installation and your product will automatically recognize your membership details.
    Refer this Link for any further assistance:- Redemption Code Help
    Hope that helps,
    Regards,
    Rahul Tyagi

Maybe you are looking for