Java tutorial
//package com.java2s; /* * Copyright (c) 2013, Bui Nguyen Thang, thang.buinguyen@gmail.com, thangbui.net. All rights reserved. * Licensed under the GNU General Public License version 2.0 (GPLv2) * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html */ import javax.swing.*; import java.awt.*; public class Main { public static void setTheme() { final Color color = new Color(85, 142, 119); final Color colorBackground = new Color(247, 247, 247); Image error_dialog_icon = new ImageIcon("/images/error_dialog.png").getImage(); UIManager.getLookAndFeelDefaults().put("nimbusOrange", color); UIManager.getLookAndFeelDefaults().put("control", colorBackground); UIManager.getLookAndFeelDefaults().put("OptionPane.errorIcon", error_dialog_icon); UIManager.getLookAndFeelDefaults().put("OptionPane.background", colorBackground); UIManager.getLookAndFeelDefaults().put("Panel.background", new Color(245, 245, 245)); UIManager.put("Table.background", new Color(250, 250, 250)); // UIManager.put("Table.alternateRowColor", new Color(159,203,64)); } }