Added icon - thanks WickedGamingUK!

This commit is contained in:
StevenLawson 2014-08-15 22:23:57 -04:00
parent b968784e62
commit 5bf90be2d2
2 changed files with 8 additions and 0 deletions

View file

@ -1,6 +1,7 @@
package me.StevenLawson.BukkitTelnetClient; package me.StevenLawson.BukkitTelnetClient;
import java.awt.Color; import java.awt.Color;
import java.awt.Toolkit;
import java.awt.event.KeyAdapter; import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import java.io.BufferedReader; import java.io.BufferedReader;
@ -9,6 +10,7 @@ import java.io.File;
import java.io.FileReader; import java.io.FileReader;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.net.URL;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@ -44,6 +46,12 @@ public class BTC_MainPanel extends javax.swing.JFrame
this.loadServerList(); this.loadServerList();
final URL icon = this.getClass().getResource("/icon.png");
if (icon != null)
{
setIconImage(Toolkit.getDefaultToolkit().createImage(icon));
}
this.setLocationRelativeTo(null); this.setLocationRelativeTo(null);
this.setVisible(true); this.setVisible(true);
} }

BIN
src/main/resources/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB