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 2 of 2

Thread: load from text into JTable

  1. #1
    Junior Member
    Join Date
    Apr 2013
    Posts
    4
    My Mood
    Amused
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow load from text into JTable

    hello everyone,
    i am creating a program to help a friend handle his client dataBase (is not very big)
    and i couldn't find a proper way to load file content into a JTable (or even a simple array)
    what am asking maybe an algorithm problem more than a java problem,
    let's say this is the content of my text file

    *

    #name# client1
    #price# 50.00
    #date# 30/05/2013

    *

    #name# client2
    #price# 70.00
    #date# 05/06/2013

    *
    #name# client3
    #price# 20.00
    #date# 30/05/2013
    i figured how to define the table size, colomn is already known and rows is how many stars do i have in that text, what i can't do is how to fill the table ?
    i know it must be an easy solution for this (am sure there is more than once) and it's 4.30am here now am really dead now
    soooo can you please help

    thank you


  2. #2
    Member angstrem's Avatar
    Join Date
    Mar 2013
    Location
    Ukraine
    Posts
    200
    My Mood
    Happy
    Thanks
    9
    Thanked 31 Times in 29 Posts

    Default Re: load from text into JTable

    Swing's JTable implements MVC pattern. That is, all the manipulations with data must be done from the model. You can get a model of a table using a getter.

Similar Threads

  1. [SOLVED] How to i load my txt file into jtable?
    By legend101z in forum File I/O & Other I/O Streams
    Replies: 8
    Last Post: April 7th, 2013, 07:39 PM
  2. how do i load my text file into my jtable.
    By legend101z in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: April 6th, 2013, 02:23 PM
  3. How to i load my txt file into jtable?
    By legend101z in forum What's Wrong With My Code?
    Replies: 0
    Last Post: April 6th, 2013, 01:18 PM
  4. Replies: 21
    Last Post: November 27th, 2012, 09:58 PM
  5. Import data form text into Jtable
    By redpower1989 in forum AWT / Java Swing
    Replies: 10
    Last Post: November 24th, 2011, 07:35 AM