Makes sure all GUI windows have the same icon
All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good
All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good
This commit is contained in:
parent
b021de5594
commit
50b9188229
@ -2,10 +2,14 @@ package net.knarcraft.minecraftserverlauncher.userinterface;
|
|||||||
|
|
||||||
import net.knarcraft.minecraftserverlauncher.utility.BackupUtil;
|
import net.knarcraft.minecraftserverlauncher.utility.BackupUtil;
|
||||||
|
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import static net.knarcraft.minecraftserverlauncher.utility.CommonFunctions.getResourceAsStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Backup GUI is used to display backup progress
|
* The Backup GUI is used to display backup progress
|
||||||
@ -33,6 +37,13 @@ public class BackupGUI implements ActionListener {
|
|||||||
frame = new JFrame("Running backup...");
|
frame = new JFrame("Running backup...");
|
||||||
frame.setBounds(100, 100, 500, 140);
|
frame.setBounds(100, 100, 500, 140);
|
||||||
frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
|
frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
|
||||||
|
ImageIcon img;
|
||||||
|
try {
|
||||||
|
img = new ImageIcon(ImageIO.read(getResourceAsStream("GUIIcon.png")));
|
||||||
|
frame.setIconImage(img.getImage());
|
||||||
|
} catch (IOException ignored) {
|
||||||
|
}
|
||||||
|
|
||||||
progressTextArea = new JTextArea();
|
progressTextArea = new JTextArea();
|
||||||
progressTextArea.setEditable(false);
|
progressTextArea.setEditable(false);
|
||||||
progressBar = new JProgressBar();
|
progressBar = new JProgressBar();
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
package net.knarcraft.minecraftserverlauncher.userinterface;
|
package net.knarcraft.minecraftserverlauncher.userinterface;
|
||||||
|
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import static net.knarcraft.minecraftserverlauncher.utility.CommonFunctions.getResourceAsStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class keeps track of all consoles
|
* This class keeps track of all consoles
|
||||||
@ -31,6 +35,12 @@ public class ServerConsoles {
|
|||||||
frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
|
frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
|
||||||
consolesTabbedPane = new JTabbedPane(JTabbedPane.TOP);
|
consolesTabbedPane = new JTabbedPane(JTabbedPane.TOP);
|
||||||
frame.getContentPane().add(consolesTabbedPane, BorderLayout.CENTER);
|
frame.getContentPane().add(consolesTabbedPane, BorderLayout.CENTER);
|
||||||
|
ImageIcon img;
|
||||||
|
try {
|
||||||
|
img = new ImageIcon(ImageIO.read(getResourceAsStream("GUIIcon.png")));
|
||||||
|
frame.setIconImage(img.getImage());
|
||||||
|
} catch (IOException ignored) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user