Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Still not Good

  1. #1
    Junior Member
    Join Date
    Apr 2013
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Still not Good

    Hi, Can some please help me with this code, I managed to do some changes but still not running on web browser this is the rusult

    SecurityException, your security settings have blocked a local application from running, but ist running on eclipse,

     <import java.applet.*;
    import java.awt.*;
    import java.util.Scanner;
     
     
    import javax.swing.JLabel;
    import javax.swing.JOptionPane;
     // I'will use something external to my program
     
    	public class IT_And_Game_Design_Student extends Applet{
     
     
    		public void init(){
     
     
    	    String possibility; // declaring a Options
    	      int failed = 0; // declaring 2 as failed Student
    	      int passed = 0; // declaring 1 as passed Student
     
    	      for(int i = 1; i<11;++i){ // it will only loop 10 times since i the first student is greater or equal to the 12 Student
     
     
    	      JOptionPane.showMessageDialog(null, "Display if  " +i+ "º STUDENT PASSED (1) OR FAILED (2) and Ben Mondo's final result? ");
    	      possibility = JOptionPane.showInputDialog("");
    	      int poss = Integer.parseInt(possibility);
    	      // next line
     
    	      if(poss == 1) // when number 1 is pressed from keyboard 
    	      {  
     
     
     
    	          passed++; // the student passed
    	      }
     
    	      else if(poss == 2) // when number 2 is pressed from keyboard 
    	      {
     
    	         failed++; // student failed
    	      }
    	      else
    	      {
    	    	  JOptionPane.showMessageDialog(null, "wrong number!!!!!" + "Please Try again, remember you can only type 1 Or 2 Thank you...");  //  print the argument 
     
     
     
    	         i--;
     
    	      }
    	      }
    	      JOptionPane.showMessageDialog(null,"The number of succesful students in IT and Game Design is  : " + passed); // print the argument
     
     
     
    	      JOptionPane.showMessageDialog(null,"the number of unsuccesful Students in IT and Game Design is: " + failed);//  print the argument 
     
     
     
    	      if(passed > 0){
    	    	  JOptionPane.showMessageDialog(null," And Ben Mondo was among the succesful Students, well done Ben");//  print the argument 
     
     
    	      } 
    	      else{
    	    	  JOptionPane.showMessageDialog(null," And Ben Mondo was not succesful this time");
     
    	      }
     
     
    	      }
     
     
     
     
     
     
    	}// Ending the program>


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Still not Good

    SecurityException, your security settings have blocked a local application from running,
    On Windows: Use the Control Panel's Java icon to change the security settings for java applets.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Apr 2013
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Still not Good

    Quote Originally Posted by Norm View Post
    On Windows: Use the Control Panel's Java icon to change the security settings for java applets.
    Thanks mate I did it, I had two version of java.. thanks again for ur help..

Similar Threads

  1. Good Evening all of you .
    By shaileshhurde in forum Member Introductions
    Replies: 2
    Last Post: April 16th, 2013, 01:21 PM
  2. Good morning
    By Guinsoo in forum Member Introductions
    Replies: 1
    Last Post: February 2nd, 2013, 05:44 AM
  3. How good is kryonet?
    By moon_werewolf in forum Java Theory & Questions
    Replies: 3
    Last Post: December 18th, 2012, 03:32 PM
  4. Good morning everyone
    By r-veras in forum Member Introductions
    Replies: 1
    Last Post: January 28th, 2011, 09:36 AM
  5. Good morning!
    By gnome in forum Member Introductions
    Replies: 0
    Last Post: January 1st, 2011, 04:18 PM