User Profile

Collapse

Profile Sidebar

Collapse
Tripmaker
Tripmaker
Last Activity: Nov 24 '07, 03:58 PM
Joined: Jun 18 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • 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....
    See more | Go to post

    Leave a comment:


  • 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...
    See more | Go to post

    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() + " ' ";...
    See more | Go to post

  • Tripmaker
    started a topic Scroll bar attached to text area
    in Java

    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);
    ...
    See more | Go to post

  • Tripmaker
    replied to Help with ERROR
    in Java
    Thanks. I'll try that....
    See more | Go to post

    Leave a comment:


  • Tripmaker
    replied to Tricky stuff
    in Java
    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....
    See more | Go to post

    Leave a comment:


  • Tripmaker
    replied to Tricky stuff
    in Java
    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...
    See more | Go to post

    Leave a comment:


  • Tripmaker
    started a topic Help with ERROR
    in Java

    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...
    See more | Go to post

  • This 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.
    See more | Go to post

    Leave a comment:


  • Tripmaker
    replied to Math.Random()
    in Java
    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...
    See more | Go to post

    Leave a comment:


  • Tripmaker
    replied to Math.Random()
    in Java
    Thanks. Never thought of that option.

    Petra...
    See more | Go to post

    Leave a comment:


  • Tripmaker
    replied to Math.Random()
    in Java
    Hi Jos

    Sorry, my fault. Didn't read the answer correctly. Too many late nights I guess.

    Thanks for all you help

    Petra...
    See more | Go to post

    Leave a comment:


  • Tripmaker
    replied to Math.Random()
    in Java
    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...
    See more | Go to post

    Leave a comment:


  • Tripmaker
    replied to Math.Random()
    in Java
    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...
    See more | Go to post

    Leave a comment:


  • Tripmaker
    started a topic Math.Random()
    in Java

    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
    See more | Go to post
No activity results to display
Show More
Working...