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 9152547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:04:41+00:00 2026-06-17T12:04:41+00:00

I have a requirement where i need to display Streaming Data like Bid ,

  • 0

I have a requirement where i need to display Streaming Data like Bid , Ask , Last , Change values for the Stock Quote Symbols recievied from a third party server in a Grid .

For this can i use a Jtable as the Data would be chnaging continously ??

Please share your views , thanks in advance

  • 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-17T12:04:43+00:00Added an answer on June 17, 2026 at 12:04 pm

    Yes, why not use a JTable for that matter. I guess that at some point you will have to create a SlidingWindow over your TableModel in order to avoid excessive data.

    Here is a small demo example that shows one way to do it (the Random and Timer are just there to simulate the incoming data):

    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.Date;
    import java.util.Random;
    
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.SwingUtilities;
    import javax.swing.Timer;
    import javax.swing.UIManager;
    import javax.swing.UnsupportedLookAndFeelException;
    import javax.swing.table.DefaultTableModel;
    
    public class TestStreamingDataTable {
    
        protected void initUI() {
            final Random random = new Random();
            final DefaultTableModel model = new DefaultTableModel(new String[] { "Bid", "Ask", "Last", "Change values", "Time" }, 0);
            final JTable table = new JTable(model);
            table.setFillsViewportHeight(true);
            JFrame frame = new JFrame(TestStreamingDataTable.class.getSimpleName());
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JScrollPane scrollpane = new JScrollPane(table);
            frame.add(scrollpane, BorderLayout.CENTER);
            frame.pack();
            frame.setVisible(true);
            Timer t = new Timer(1000, new ActionListener() {
    
                @Override
                public void actionPerformed(ActionEvent e) {
                    model.insertRow(0, new Object[] { random.nextInt(1000), random.nextInt(1000), random.nextInt(1000), random.nextInt(1000),
                            new Date() });
                }
            });
            t.start();
        }
    
        public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException,
                UnsupportedLookAndFeelException {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            SwingUtilities.invokeLater(new Runnable() {
    
                @Override
                public void run() {
                    new TestStreamingDataTable().initUI();
                }
            });
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a requirement wherein I need to display on a User form, a
I have a requirement where i need to display a aspx page say login.aspx
I have a requirement in which i need to display in formation in a
I have a requirement wherein I need to display a list of employees and
I have a requirement where i need to display 1000 images which will take
I have a requirement where in need to display the Pdf / Word doc(any
I have data I need to display/edit that does not seem to fit naturally
Scenario: I need to display the average of the last 20 reported values. I
i have a requirement where i need to display a video at the center
I have a requirement in JasperReports wherein I need to display the field based

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.