I replaced txt2.setText(scan.next());, with txt2.append(scan.next());, and it seemed to work, but it is mashing both words together.... :eek:
I guess I need to figure out how to keep a space...
Type: Posts; User: zlloyd1
I replaced txt2.setText(scan.next());, with txt2.append(scan.next());, and it seemed to work, but it is mashing both words together.... :eek:
I guess I need to figure out how to keep a space...
So you are saying that the line, txt2.setText(scan.next());, should be txt2.append(scan.next());?? :confused:
Or should I add another line of code after txt2.setText(scan.next());?? #-o
The following code is supposed to take data entered into a text field, and send it to an external file. Then it is supposed to retrieve that data from the file and read it into a text area on the...
I am actually not truly adept at using exception handling in my code, so you could be exactly correct that I have misused the try catch block. Also, I write relatively small, simple programs...
I am not using an IDE at this time, because I am still trying to learn, and have been told that an IDE can be confusing if you do not have the language down completely. I am doing my coding in...
--- Update ---
--- Update ---
Thanks for the advice, but I do not usually concern myself with indentation until after I have the program working, and I have not gotten there as yet!! :">
...
The following code is supposed to create a small gui that will allow for text to be read from, and written to an external file.@};- I believe that the code is correct, at least as best as I know, but...
I apologize for the lazy formatting of my code, but I am writing this in notepad, and it is tiresome to keep indenting everything properly sometimes. :(|)
So, if I am reading what you are saying...
The following simple clock of code won't work, and the reason I am getting is that it has reached the end of file while parsing, but if I add another }, it comes back saying it is unnecessary??:mad:...
Thanks, I will go through the API and see if I can find what I need!! :-bd
I am trying to figure out what to use to get user input from a text field on an interface, if the values entered were doubles, and not text. I mean I know how to get text, because there is the...
Thanks all, but I found my mistake.... :P I was trying to put this all in a java file named SwingApp.java, when it should have been Application.java. After I named the file correctly, it ran fine,...
I am trying to run the following code on my computer, and it is giving me static, even though I have personally seen this exact code run on my friends computer correctly....:mad:
On my computer it...
Out of curiosity, although I can hear what you are saying here, could you answer a different question for me, that just came to me after reading your response here.
How could I add the JPanel to a...
I am creating a program in Java to calculate various retail figures having to do with sale prices in different departments, and for some reason when I run my program I am getting an empty window that...
I have created a simple program to create a graphical user interface GUI window that contains the text Hello World in it, and in NetBeans it compiles and runs fine. Unfortunately, it does not run in...
"One thing that confuses me is that in my mind something this basic, getting a single input from the user, can be done by a simple method of Pay rather than creating a whole other class, EmpChoice,...
You did not understand what I wrote in my previous reply to you, as to what the classes were set up to accomplish?? Okay, well the first, and main class, called Pay, is supposed to call the class...
To answer your questions, EmpChoice is one of three files, each with its own purpose in an employee payroll script I am working on. The only true functions of EmpChoice should be getting the number...
Alright, I get what you are saying here, sort of, but when I try to call it from inside the main method it won't recognize it, and I think I am using correct coding.... :|
Anyway, here are the...
I am trying to call an external calls from a separate file within the same Java program, but it keeps telling me to create the method in the current class for some reason?? :confused: This floors me...
Alright, I divided it into two separate classes within my program, but now it doesn't run correctly?? :o
Here is what I have now:
package zackfinal;
import java.util.*;
public class ZackFinal...
Thanks, I will do that and re-post if I run into problems!! <):)
I need the files to be in two separate instances , so that I can change the list when changes in policy dictate, but the initial user interface part of the program will be secured, and inaccessible...
I have made a program in Java that is designed to take user input in the form of a yearly sales total, and use it to calculate their yearly commission bonus, and then return this value to the user. I...