This worked. Thank you. Why did hasNext work and not hasnextLine not work?
Type: Posts; User: loui345
This worked. Thank you. Why did hasNext work and not hasnextLine not work?
The overall homework assignment is not difficult, but I am having a bit of trouble figuring out how to use the CTRL-D in my program. The program records the amount of times a positive and negative...
HI,
Thank you the fix worked, but I have to make sure I understand exactly from this situation,so I can grow from this situation and correct my thinking pattern. So in this analogy, if Objects...
class Gamehandler extends JFrame implements ActionListener {
//questions
JPanel qpanel = new JPanel();
//answers
JPanel aPanel = new JPanel();
JRadioButton[] responses;
...
Hello,
In the past, i have had no problems using FileInputStream and OutputStream to copy files. This time is different even though I have copied the code from previous programs.
public void...
Can you please point into a direction where I could learn to do this. I am glad that I know the problem. I am unsure on how to do this. In this situation, is getClassLoader method applicable?
Hi Norm,
Okay now it makes sense. Your last explanation clarifies a lot. I did not realize that it was in two parts. A classpath and class path. I was thinking it was all together. How do this? ...
Hi Norm,
The reason why I was putting the File object into the argument is because I thought I was instructing the getResource method to look into the folder"C:\\Test". I assumed File object was a...
Hi Norm,
Thank you for working with me in this matter.
Okay, the path that I am using for my picture is: (C:\\Test\\"nameoffile.png"). Now, I know that this works as I had sucess following your...
Man, I had it working perfectly,I moved a few things around, now it does not work, and I cannot make it work again. I thought I understood perfectly and as it turns out I do not.
I understand...
Hi Norm,
You nailed it. That was the problem I was having. I learned a lot from this. The program is working perfectly. I would not have figured that out without this community. I greatly...
Norm,
If I type out system.out.println(f), it shows the path with the extension of the file png, and I am also typing in the constructor the "png" could this cause a problem? if so, how do I fix...
Hi,
I attempted to do as you suggested still with no success. Before trying it, I thought it would def. work. Wondering why it is not working!!!
Here is the code I tried it's only two lines...
Hi, Curmudgeon,
The images are not held in the jar file. They're added as time goes. As an example, say I find a knew item i am looking to sell and I would like to add it to my already compiled...
sorry, curmudgeon, I am n00b when you say "command line" do you mean the cmd prompt? My Jar file name is business.jar, so where would I type that in at?
Also, there should be no images...
Hello,
Quick question, I created a program for my small business. The program displays the image of the product i sell overseas. It works perfectly until I put it into a Jar file. See the...
Hey Norm,
I had to take a few days to really understand my problem, so I can correctly communicate it to you. See my problem, is I have a set of items in a combobox and I am trying to link items...
Alright, let me try to explain in more detail. When I type in the .getResource constructor, the literal String of the image will move with the combobox. It works well with the If and Else...
More of my code
jd.setText(NameofProduct);
jfield.setText(jtProfitindex1);
jtProfit.setText(OrginalPrice);
...
Hello,
I setting a image using the ImageIcon getResource syntax and I am I having trouble displaying an Image. It works fine when I type the String and not store it in a variable. It displays the...
Hi,
I got a program and I decided to update the program. One feature I was interested in was using a Combobox and having it change the pictures of the items I am selling. I was able to achieve...
hello,
I been programming for 7 months now and I am the stage when I want to know what Java can really do. I am fasicating with making a program that can connect to the internet and do things. I...
Hey JavaWorld!!
Trying to determine if it is even possible to have a JTextfield remember a userinput. For example, my wife uses my program and she is tried of typing the same repetitive data,...
I did a few google searches and it worked thank you. I can now do it many times and the program does not need to be restarted.
Can you please elaborate on what "trim()" means. Thank you so much.