GIDForums  

Go Back   GIDForums > Computer Programming Forums > Java Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 17-Oct-2005, 19:31
pjpav's Avatar
pjpav pjpav is offline
New Member
 
Join Date: Sep 2005
Location: Beautiful NorthEastern Pennsylvania!
Posts: 8
pjpav is on a distinguished road

Applet not initialized?


o.k. I took a break from this stuff because it is very discouraging. I am attempting to develop a web page (which I have never done) for a kids judge neuroscience presentation that I have to give and I would like to incorporate a simple program that provides an animated version of our presentation, specifically "beating of the eardrum". I have utilized my Java 5 Illuminated to try to become familiar with the applet animation concepts and I am getting the response Applet not initialized along with compiler errors. Does anyone know what I am doing wrong, I appreciate your help because my professor sucks!
Here is the program, verbatim from the text book:

JAVA Code:
 import javax.swing.JOptionPane;
   import java.awt.Graphics;
   import java.awt.Color;
    public class BalloonDraw extends JApplet
   {
      Balloon bl;
      String colorSelectS;
      char colorSelectC;
      Color blColor;
   
       public void init()
      {
         colorSelectS = JOptionPane.showInputDialog("Pick a color\n" + "r for red, g for green, b for blue");
         colorSelectC = colorSelectS.charAt( 0 );
      
         switch ( colorSelectC)
         {
            case 'r':
            case 'r':
               blColor = Color.RED;
               break;
         
            case 'b':
            case 'B':
               blColor = Color.GREEN;
               break;
         
            default:
               blColor = Color.YELLOW;
         }
         bl = new Balloon( 150, 100, 50, blColor );
      }
   
       public void paint (Graphics g)
      {
         super.paint(g);
      
         bl.draw (g);
      }
   }
Last edited by LuciWiz : 18-Oct-2005 at 00:19. Reason: Please insert your Java code between [java] & [/java] tags
  #2  
Old 18-Oct-2005, 19:06
Paramesh's Avatar
Paramesh Paramesh is offline
Regular Member
 
Join Date: Sep 2005
Location: The Milky Way
Posts: 929
Paramesh is a jewel in the roughParamesh is a jewel in the roughParamesh is a jewel in the rough

Re: Applet not initialized?


Hi pjpav,

What is the Balloon class you have used here?
If give the code of the Balloon class, we may find the error.

and in your switch case statement,
JAVA Code:
            case 'r':
            case 'r':

Can you find what error you have made?

Regards,
Paramesh.
__________________

Don't walk in front of me, I may not follow.
Don't walk behind me, I may not lead.
Just walk beside me and be my friend.
  #3  
Old 18-Oct-2005, 20:48
pjpav's Avatar
pjpav pjpav is offline
New Member
 
Join Date: Sep 2005
Location: Beautiful NorthEastern Pennsylvania!
Posts: 8
pjpav is on a distinguished road

Re: Applet not initialized?


hmmm, I gave up on that program and tried another program (draw an astraunaut) that was in my text and everything worked out just fine. Maybe you can help me with this predicament, I was attempting to create my very first web page utilizing NVu and I lost power in my house and I didn't save the info on my as I was progressing throughout my project, is there any miraculous way that I could retrieve this info? I have already tried the "recent pages" tab to no avail. I was wondering if computers had built in key loggers that were easily accessible he, he, :-) lol!
 
 

Recent GIDBlogNot selected for officer school by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
i really need help in coding this applet.. i gave up !! plz help 123awd Java Forum 7 02-Nov-2005 03:33
Need Help with my Cards Program (C++) krisopotamus C++ Forum 2 06-Oct-2005 16:48

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 18:52.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.