hi guys im new to this site so be kind
and im new to
java applets as well
my problem is this:
im trying to access a txt file that is in the same directory as the Applet problem is it doesnt read the file
notice that with the exact URL im accessing my images and it does work, but the text file wont read
the code snippet is:
public void itemStateChanged(ItemEvent e) {
try {
Image sunday = getAppletContext().getImage(new URL(getCodeBase() + "sunday.gif"));
Image wednesday = getAppletContext().getImage(new URL(getCodeBase() + "wednesday.gif"));
Image thursday = getAppletContext().getImage(new URL(getCodeBase() + "thursday.gif"));
// URL url=new URL(getCodeBase().toString()+"info.txt");
URL url = new URL("ftp://username:passoword@schoolme.site90.com/public_html/Practice_page/info.txt");
BufferedReader br=new BufferedReader(new InputStreamReader(url.openStream()));
jLabel12.setText( br.readLine());
in this current form it works but it takes hours for the server to respond i want to access it with the // URL and it doesnt work
please help
thank you