/** * Tente d'appliquer un look and feel en le recherchant par son nom dans la * liste des look and feel installes. * * Ne fait rien si le aucun des look and feel installes ne porte le nom * fourni. * * @param nom * nom du look and feel a appliquer * @throws UnsupportedLookAndFeelException * @throws IllegalAccessException * @throws InstantiationException * @throws ClassNotFoundException */ public static void setLookAndFeelParNom(String nom) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException { LookAndFeelInfo[] informationsLnf = UIManager.getInstalledLookAndFeels(); String nomLnf; for (LookAndFeelInfo informationLnf : informationsLnf) { nomLnf = informationLnf.getName(); if (nomLnf.equals(nom)) { String classeLnf = informationLnf.getClassName(); UIManager.setLookAndFeel(classeLnf); break; } } }
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question