Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Displaying database results on a GUI in a JTextArea with button click

  1. #1
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Displaying database results on a GUI in a JTextArea with button click

    Please edit your post and wrap your code with
    [code=java]
    <YOUR CODE HERE>
    [/code]
    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.


  2. #2
    Junior Member
    Join Date
    Feb 2013
    Posts
    18
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: Displaying database results on a GUI in a JTextArea with button click

    hi, thanks for your reply, i'm new to this site and accidentally deleted the post but i have set another one up under the same name as i have given this thread, any help you can give me would be great thanks, i have also but the code in the brackets as you have stated

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Displaying database results on a GUI in a JTextArea with button click

    Can you be more specific about the problems you are having. This is a lot of code, most of which probably has nothing to do with the problem you are having.
    If you don't understand my answer, don't ignore it, ask a question.

  4. #4
    Junior Member
    Join Date
    Feb 2013
    Posts
    18
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: Displaying database results on a GUI in a JTextArea with button click

    i wish i could trim the coding down but it's all revevant, what i need is to some how put the retrivefiletype class into the if(e.getSource==openButton) in the projectAssignment class which will make it so that when the open button is clicked it will get the hex values of the selectedFile, then i need it to somehow compare this data to a database of file signatures and then print out the corresponding file type in the row, for example, if the user selects a pdf file, the codng should get for example 25 40 46 34 from the selected file, and then match it with the pdf row in the database where it should then print the file type as (the file type of this file is: PDF file) in my JTextArea in the projectAssignment class, i am at a loss with this coding, i am at a brick wall

  5. #5
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Displaying database results on a GUI in a JTextArea with button click

    but it's all revevant
    Make special testing drivers that set the values the user would enter to bypass that code.

    What does the code do? Open a file, read some bytes compare those bytes to a table of bytes and find a match for those bytes that gives some info about the file.
    Hard code as much of that as you can and work on one part at a time.

    Not many people will want to work with this large of a program. Isolate and reduce each part of the program to a small program that is easier to work with.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. How to close a frame on a button click ??
    By rk0887 in forum AWT / Java Swing
    Replies: 1
    Last Post: August 22nd, 2012, 08:58 AM
  2. Searching and displaying results in a multi-dimensional array.
    By wfalcon2012 in forum Collections and Generics
    Replies: 2
    Last Post: February 18th, 2012, 08:06 PM
  3. add JTextField with a click of button
    By A4Andy in forum AWT / Java Swing
    Replies: 1
    Last Post: August 31st, 2011, 07:34 AM
  4. [SOLVED] Click button to open JDialog
    By susieferrari in forum Java Theory & Questions
    Replies: 6
    Last Post: March 30th, 2011, 09:24 AM
  5. close JDialog on button click
    By Christophe in forum AWT / Java Swing
    Replies: 4
    Last Post: April 4th, 2010, 11:04 PM

Tags for this Thread