Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Another convert applet to application

843785Dec 11 2008 — edited Dec 11 2008
I did a search and was reading how to convert this blackjack applet into an application, and I have been making good progress. However, I am very confused about not using getCodeBase(). So far it compiles correctly until it hits that method. Here is the code that calls the offender:
for(current_card_loading=0; current_card_loading < 52; current_card_loading++){

		  //try{
			card_images[current_card_loading] = getImage(getCodeBase(),
												"cards/" + (current_card_loading+1) + ".gif");

			if(card_images[current_card_loading] == null){
				System.out.println("Null card... ["+current_card_loading+"]");
			}else{
				t.addImage(card_images[current_card_loading],0);
			}
		
			try{
				t.waitForID(0);
			}catch(InterruptedException e){
				System.err.println("Interrupted, waiting for images..>");
			}
			//lets show our new status.
			repaint();
		}
Can anyone explain to me what I should switch this with and how?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 8 2009
Added on Dec 11 2008
4 comments
52 views