java - Jar program works fine on windows 7 machine, widnows 8 wont show custom images -



java - Jar program works fine on windows 7 machine, widnows 8 wont show custom images -

ok, i'm not sure code guys need see help issue. allow me finish possible explanation. have program, made jar (include images directory custom images utilize background , buttons.) . set jar installer (it's executeable jar double click run on computer has java). using nsis. installer works great installed on windows 7 machine did programming , has jre , jdk installed (1.7). works champ! stoked! lot of our customers though have windows 8, vista mac etc.. need test on other windows machines ensure works. tested first on windows 8.1 machine sitting next windows 7 machine (wifes computer). installed java using installer (yay!) , installed jar did on window 7 machine. used shortcut (and jar itself) , programme comes up, doesn't show used custom images on. ie: background image close minimize buttons, buttons install (it's auto updater wow addons) or finished buttons. none of stuff displays , can't figure out why. tried changing images utilize bufferedimage , imageio no joy, tried setting lookandfeel scheme , feel. no help. sure shows jprogress bar ont eh first card (using cardlayout), shows username , password jtextfields, , autologin checkbox on login card, advertisement table , jtextfield (for showing patch notes) on addons card. there no backgournd, no buttons no nil else. allows me clickthru stuff behind updater if background , buttons did not exist. happens on windows 8, tested after on vista machine , xp machine. works fine on vista, xp, , windows 7, windows 8 machine doesn't show of custom images (wich 1 time again included in jar , utilize absolute paths them) have clue might going on? kind of code see help troubleshoot this? gets me works fine on windows machines except windows 8. arrrrrgh!! please help!

ok, did test cutting , pasting code updater programme it. same problem occurs. though think may have thought of problem now. though included files of images in jar, may how have them in code, i'm still not sure how prepare that.

import javax.swing.*; import java.io.*; import java.awt.*; import java.awt.image.*; import javax.imageio.*; //public static final string bg_image_path = "f:\\java programs\\updater\\src\\com\\dynastyaddons\\updater\\images\\background.png"; private static jframe rootframe; public testbackgrounds() { rootframe = new jframe(); springlayout rootlayout = new springlayout(); // setup root frame rootframe.setundecorated(true); rootframe.setbackground(new color(0,0,0,0)); rootframe.setdefaultcloseoperation(jframe.exit_on_close); rootframe.setpreferredsize(new dimension(800,600)); rootframe.settitle("dynasty addons updater"); // add together background image jlabel bg = new jlabel(); seek { image mybgpic = imageio.read(getclass().getclassloader().getresourceasstream("background.png")); bg = new jlabel(new imageicon(mybgpic)); } grab (ioexception ignore) { system.out.println("error: " + ignore.getmessage()); } bg.setlayout(rootlayout); rootframe.add(bg); rootframe.pack(); rootframe.setlocationrelativeto(null); rootframe.setvisible(true); } public static void main(string[] args) { // schedule job event dispatch thread. javax.swing.swingutilities.invokelater(new runnable() { public void run() { testbackgrounds tb = new testbackgrounds(); } }); }

java image jar windows-8.1

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -