Sam Woodhams

Greenhorn
+ Follow
since Sep 01, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sam Woodhams

ok that makes more sence, thanks.

Is there anyway to load the image into the jar and then accses it in the jar?
Wow its a while since i've posted, reel life caught up with me so i had to put my programing learning on the back burnner, but now im back

Anyway here's my problem, I have a project that i decided to have a Jpanel with logo in it do i used the following code,

This is just the method i used to create the JPanel and this works fine. My problem is when i compile my code into a exectuable Jar and run it the logo doesn't appear. so to find out why i added this code to bugtest

when run in the IDE the image appears fine, but when i compile and then run the image doesn't appear and it gives me the JLabel meaning that the file dosen't exsist!

I think my question is is there a particular way of telling eclipse to incude the extra file when it compiles to a .jar file.

thanks in advance,

sam
The first thing I want to say is that I’m brand new to java so with that in mind here is my problem.

I have a small app that basically generates a random string of characters that the user can use as a password. The length of the password can be defined by the user and here lies the problem. I want the input of the JTextfield to be restricted so that only numbers can be entered and that it’s limited to 3 characters. As it stands the code can do that, however it does not do it how I would like it to. The entire mask has to be filled in by the user, so for example the value 1 has to put in as 001 which is not what I want to be. Also it is possible to have gaps in between the numbers like 1 5 which causes it to error. I’ve removed it silently erroring by adding a workaround but all it does is that if that error happens it just defaults to 000.



i'll include class Genarate and class Copy just incase you want to run the entire app





thanks in advance for helping

sam
10 years ago