If Anyone Knows , can you please help me how to import the text file to JTable by using JFilechooser ?

Even the text file contains the specific charecters line length

eg: idUsernamePasswordEmailAgeGender ( ID = 2 Chars, Username = 10 chars ( if username not having 10 chars means, it include space for that, password = 5 chars, email = 5 chars, Age = 2 chars, Gender = 1 chars)
Here is my code :

i am not getting error .
Here i attached my code link.
https://coderanch.com/t/704099/java/read-text-file-JTable-JFilechooser#3302082

And my text file values : ( i saved in sampleinput.txt)

Output is :

1a.PNG

1b.PNG

1c.PNG

But i need the text file in Jtable by using jfilechooser. plz help me...

Thanks in advance

Recommended Answers

All 3 Replies

Duplicate posting of the same question asked and answered on coderanch. Also apparently posted on dreamincode.

commented: Good to know. +15

Hi ikoren
That example you linked to was created by Amruta Sriram (the originator of this thread) and is exactly the same as (s)he posted here.
The link you suggested is in the original post.
The people at coderanch did a perfectly good job of answering it, so I have no idea why it has been re-posted here.
It looks like Amruta Sriram is a time waster, and I wouldn't waste any of your time unless we get some clarification of why it was re-posted.

JC

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.