Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8151829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:31:10+00:00 2026-06-06T15:31:10+00:00

I want a JTable to be populated with certain information. That information (i.e the

  • 0

I want a JTable to be populated with certain information. That information (i.e the values stored in rows of the table) changes periodically. What I thought to implement it was storing the contents everytime the JTable is updated in a .txt file and then display that text file in a JTable.

Now my question is that is it a good approach? I mean if I store the contents of a text file into a JTable, when something is updated in the JTable, that updation will not be shown to the user unless they re-run the app (because a text file can’t be read and written all at once).

Can anyone suggest me a good approach to it? The app needs to be real time so every time i.e I want the users to see the updated information dynamically while the app is running. I dont want them to close the app again and again to see the updated inofrmation. I’m using Java and linux.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:31:12+00:00Added an answer on June 6, 2026 at 3:31 pm

    Here’s another question on stack overflow that may help you out

    Reading contents of a file into a 2D array

    here’s the code that reads a file into a 2D array

    FileInputStream inputStream = new FileInputStream(fileName);
    Scanner scanner = new Scanner(inputStream);
    DataInputStream in = new DataInputStream(inputStream);
    BufferedReader bf = new BufferedReader(new InputStreamReader(in));
    
    int lineCount = 0;
    while ((line = bf.readLine()) != null)
    {
        String[] numbers = line.split(" ");
        for ( int i = 0 ; i < 3 ; i++) 
             matrix[lineCount][i] = Double.parseDouble(numbers[i]);
    
        lineCount++;
    }
    
    bf.close();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to display a JTable that display the data from a DataBase table
I want to implement a properties table in jtable (swing). I want to have
I want to bind a database table to a swing JTable, and make that
I want to implement DropTargetListener with a JTable as a target. This is roughly
I have a JTable that I want to use to display some data (a
I want to store the results of reading lucene index into jTable, so that
I have a JTable of data. I want it so that when a row
I want map a List of beans to a JTable. The idea is that
I want to implement a TableModel, that will enable my existing data structure to
I want to programmatically deselect the currently selected row (or rows) in a JTable.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.