You're correct in assuming that my GUI is Java Based. Please forgive me, but please can you explain in laymans terms what you want me to do. I'm very new at programming.
Thank you....
User Profile
Collapse
-
When I type in a persons name in my GUI I want it to link to my database and give me the persons telephone number, the book they loaned and the date that they took the book.
Petra...Leave a comment:
-
Please help with selecting a String from a database
What is wrong with my codeing. When I select the search button via my GUI, the GUI dissappears, it doesn't even go to the catch dialog. But when I copy and paste my search query to MySQL it works normally. Please explain.
Here is my code:
[CODE=java]If (source == searchB)
{
try
{
query = "SELECT Telephone,Book, Date from loan WHERE Name = ' " +
nameT.getText() + " ' ";... -
Scroll bar attached to text area
I'm trying to set u a scroll bar to be attached to the text area with a border around it. The problem is my text area appears as a small screen above the bordered/scrolled text area.
Here is my code:
...Code:notesText = new JTextArea(); notesText.setLineWrap(true); notesText.setWrapStyleWord(true); JScrollPane scroll = new JScrollPane(notesText); scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
-
-
Let see if I can get this right. The value stays at 42 because of the while statement. In laymans terms while x == 42 the system prints out x != 42 and the program is ended. Everytime you re-run the program you keep getting the same answer. You will never get to the second while statement....Leave a comment:
-
I'm new at programming so I'm going to take a calculated guess. The answer for a = 0.7999999999999 999 . The reason being double belongs to Floating-point numbers which represent numbers with fractional precision. Double doesn't round off a number.
Petra...Leave a comment:
-
Help with ERROR
Hi!
In my 'if' statement I'm wanting to say that if the following three textField are not an empty string then it must execute the statements that I've stipulated. The problem is I keep getting an error in my 'if' statement.
My code looks as follows:
if(loanField3 != "" && loanField4 != "" && loanField5 != "")
the error it gives me is 'incomparable... -
Tripmaker replied to Column name or number of supplied values does not match table definition in jspin JavaThis is just a suggestion. I sometimes come up with the same error only to find that the order of the tables in the database do not match the order in my program. SQL is very sensitive with things like that. Also check that the number of question marks indicated in your program match the number of tables in your database.
Hope this helps.Leave a comment:
-
To answer your question about the goal. It's only a small project for our lecturer to see if we could design Customer, Employee and Resource GUIs for a Videostore. It was my idea to add the math.Random() method for customerID for a way of quick identification. It's still interesting to read other ideas of how to going about this. Who knows when I need to use it in the future.
Petra...Leave a comment:
-
-
Hi Jos
Sorry, my fault. Didn't read the answer correctly. Too many late nights I guess.
Thanks for all you help
Petra...Leave a comment:
-
I can not put an int on a text field.
this is part of my code:
int randNo = 0;
randNo = (int)((Math.ran dom()*700)+1);
custIdText.setT ext(randNo);
Petra...Leave a comment:
-
Thanks for your welcome and help. I've just completed a 10 month intense Java course at a private college and am working on a project that needs to be handed in in 2 weeks time. So I'm very new at all of this. I've tried surging the tutorials but haven't anything to help me.
Regards
Petra...Leave a comment:
-
Math.Random()
Hi! I'm new at Java and enjoying what I've learned to date. I'm busy designing a GUI (for customers of a Video store). My question is: I want to use Math.random() to generate a unique customer no. The problem is I'm using a TextField and the error that keeps coming up is that I'm unable to use int in a String field. How can I get passed this?
Thank you
Petra
No activity results to display
Show More
Leave a comment: