{
showError("No URL specified");
return;
}
setCursor(new Cursor(Cursor.WAIT_CURSOR));
try {
getContainerPlayer().setMediaLocation(location, prefs.autoPlay);
}
catch (Throwable e) {
logger.log(Level.WARNING, "" + e, e);
showError("" + e); // normally we would just want e.getMessage(), but in many cases this can be blank, like a NoPlayerException.
// for now we'll just include the whole thing which includes the class. A better way would be to
// translate an empty NoPlayerException into "Player not found" - which BTW isn't that sensible to a user not familiar with JMF...
return;
}
finally
{
setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}
// update prefs with new URL
if (!prefs.recentUrls.contains(location))
{ prefs.recentUrls.add(0, location);