Update Mage.Client, Mage.Server.Console, and AbilityPicker LaF to use the supported class name.

This commit is contained in:
Adam Pocock 2020-04-04 21:39:00 -04:00
parent 29dfb1a404
commit 26d94db661
4 changed files with 4 additions and 9 deletions

View file

@ -202,7 +202,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
config.setAccessPreference(FsAccessOption.STORE, true);
try {
UIManager.put("desktop", new Color(0, 0, 0, 0));
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
//UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
// stop JSplitPane from eating F6 and F8 or any other function keys
{

View file

@ -1,10 +1,5 @@
package mage.client.components;
//import com.sun.java.swing.Painter;
import java.awt.Color;
import java.awt.Graphics2D;
import javax.swing.JDesktopPane;
import javax.swing.UIDefaults;
import javax.swing.UIManager;
@ -22,7 +17,7 @@ public class MageJDesktop extends JDesktopPane {
public void updateUI() {
if ("Nimbus".equals(UIManager.getLookAndFeel().getName())) {
UIDefaults map = new UIDefaults();
Painter painter = (g, c, w, h) -> {
Painter<?> painter = (g, c, w, h) -> {
g.setColor( UIManager.getDefaults().getColor("desktop") );
g.fillRect(0,0,w,h);
};

View file

@ -383,7 +383,7 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
public static void main(String[] argv) {
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
} catch (Exception ex) {
}

View file

@ -60,7 +60,7 @@ public class ConsoleFrame extends javax.swing.JFrame implements MageClient {
initComponents();
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
session = new SessionImpl(this);
connectDialog = new ConnectDialog();
} catch (Exception ex) {