mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-22 07:02:29 +00:00
update icon loader for choice mode
This commit is contained in:
parent
653dc584ed
commit
59f9dcb969
@ -76,13 +76,16 @@ public class PamRunModeDialog extends PamDialog {
|
|||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Image img = ImageIO.read(getClass().getResource(File.separator+PamIcon.getPAMGuardIconPath(PamIcon.NORMAL)));
|
String file = File.separator+PamIcon.getPAMGuardIconPath(PamIcon.NORMAL);
|
||||||
normalMode.setIcon(new ImageIcon(img));
|
// icon =
|
||||||
|
ImageIcon icon = new ImageIcon(ClassLoader.getSystemResource(file));
|
||||||
|
// Image img = ImageIO.read(ClassLoader.getSystemResource(file));
|
||||||
|
normalMode.setIcon(icon);
|
||||||
normalMode.setHorizontalAlignment(SwingConstants.TRAILING);
|
normalMode.setHorizontalAlignment(SwingConstants.TRAILING);
|
||||||
viewerMode.setIcon(new ImageIcon(img));
|
viewerMode.setIcon(icon);
|
||||||
viewerMode.setHorizontalAlignment(SwingConstants.TRAILING);
|
viewerMode.setHorizontalAlignment(SwingConstants.TRAILING);
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (Exception e) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ public class PamIcon {
|
|||||||
|
|
||||||
|
|
||||||
//the default is windows. Icon automatically resize on Windows.
|
//the default is windows. Icon automatically resize on Windows.
|
||||||
String path = "Resources/pamguardIcon.png";
|
String path = "Resources\\pamguardIcon.png";
|
||||||
|
|
||||||
if (System.getProperty("os.name").equals("Linux") || System.getProperty("os.name").startsWith("Mac")) {
|
if (System.getProperty("os.name").equals("Linux") || System.getProperty("os.name").startsWith("Mac")) {
|
||||||
switch (sizeFlag) {
|
switch (sizeFlag) {
|
||||||
|
Loading…
Reference in New Issue
Block a user