Nimbus look and feel is not fully supported on many linux platforms:

* changing default look and feel to cross platform l&f on linux systems
This commit is contained in:
fros4943 2009-02-08 18:33:05 +00:00
parent d0a546b049
commit 2d671a1265

View file

@ -24,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: GUI.java,v 1.101 2009/01/08 15:43:49 fros4943 Exp $
* $Id: GUI.java,v 1.102 2009/02/08 18:33:05 fros4943 Exp $
*/
package se.sics.cooja;
@ -945,7 +945,12 @@ public class GUI extends Observable {
/* Nimbus */
try {
String osName = System.getProperty("os.name").toLowerCase();
if (osName.startsWith("linux")) {
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
} else {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
}
return;
} catch (Exception e) {
}