public RandomUser fetchRandomUser() { RandomUser user = null; try { user = RandomUserGenerator.getRandomUser(); } catch (InterruptedException ex) { Logger.getLogger(RandomUserControl.class.getName()).log(Level.SEVERE, null, ex); } return user; }
public void fetchRandomUser() { RandomUser user = null; try { user = RandomUserGenerator.getRandomUser(); } catch (InterruptedException ex) { Logger.getLogger(RandomUserControl.class.getName()).log(Level.SEVERE, null, ex); } setChanged(); notifyObservers(user); }
public void run() { RandomUser user = null; try { user = RandomUserGenerator.getRandomUser(); } catch (InterruptedException ex) { Logger.getLogger(RandomUserControl.class.getName()).log(Level.SEVERE, null, ex); } RandomUserControl control = new RandomUserControl(); control.updateObservers(user); }