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

  • SEARCH
  • Home
  • 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 8925219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:38:10+00:00 2026-06-15T07:38:10+00:00

I want to get all values within an array and store them into listview

  • 0

I want to get all values within an array and store them into listview in a way that is not through single calling storing.
Below is my code, cana someone help me to fix ?
is there a variable which can represent all content of an array

Here’s my code:

String[] TKA = new String[100];

    JTable table;  
    Object tableData[][]={  
            {TKA[1],TKA[2],TKA[3],TKA[4],TKA[5]},
            {TKA[6],TKA[7],TKA[8],TKA[9],TKA[10]},
            {TKA[11],TKA[12],TKA[13],TKA[14],TKA[15]},
            {TKA[16],TKA[17],TKA[18],TKA[19],TKA[20]},
            {TKA[21],TKA[22],TKA[23],TKA[24],TKA[25]},
            {TKA[26],TKA[27],TKA[28],TKA[29],TKA[30]},
            {TKA[31],TKA[32],TKA[33],TKA[34],TKA[35]},
            {TKA[36],TKA[37],TKA[38],TKA[39],TKA[40]},
            {TKA[41],TKA[42],TKA[43],TKA[44],TKA[45]},
            {TKA[46],TKA[47],TKA[48],TKA[49],TKA[50]},
            {TKA[51],TKA[52],TKA[53],TKA[54],TKA[55]},
            {TKA[56],TKA[57],TKA[58],TKA[59],TKA[60]},
            {TKA[61],TKA[62],TKA[63],TKA[64],TKA[65]},
            {TKA[66],TKA[67],TKA[68],TKA[69],TKA[70]},
            {TKA[71],TKA[72],TKA[73],TKA[74],TKA[75]},
            {TKA[76],TKA[77],TKA[78],TKA[79],TKA[80]},
            {TKA[81],TKA[82],TKA[83],TKA[84],TKA[85]},
            {TKA[86],TKA[87],TKA[88],TKA[89],TKA[90]},
            {TKA[91],TKA[92],TKA[93],TKA[94],TKA[95]},
            {TKA[96],TKA[97],TKA[98],TKA[99],TKA[100]},             
    };  
    String[] columnTitle = { "AA","BB","CC","DD","EE" }; 

        table = new JTable(tableData , columnTitle);
        JScrollPane jt = new JScrollPane(table);
        add(jt);
        jt.setBounds(10, 200, 700, 500);
  • 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-15T07:38:11+00:00Added an answer on June 15, 2026 at 7:38 am

    Create a new TableModel that defines how you would like your table to display.

    Application

    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    
        public class StackExample {
    
            public static void main(String[] args) {
    
                MyTableModel model = new MyTableModel("This is some string that I want to show");
    
                // Create a JTable and tell it to display our model
                JTable table = new JTable(model);
    
                // Display it all in a scrolling window and make the window appear
                JFrame frame = new JFrame("FileTableDemo");
                frame.getContentPane().add(new JScrollPane(table), "Center");
                frame.setSize(600, 400);
                frame.setVisible(true);
            }
        }
    

    TableModel

    import javax.swing.table.AbstractTableModel;
    
    public class MyTableModel extends AbstractTableModel {
    
        private static final long serialVersionUID = 1L;
        private String data;
        String[] columnTitle = { "AA","BB","CC","DD","EE" }; 
    
        public MyTableModel(String data) {
            this.data = data;
        }
    
        @Override
        public int getRowCount() {
            return data.length() / 5;
        }
    
        @Override
        public int getColumnCount() {
            return 5;
        }
    
        @Override
        public Object getValueAt(int rowIndex, int columnIndex) {
            return data.charAt((rowIndex * 5) + columnIndex);
        }
    
        @Override
        public String getColumnName(int column) {
            return columnTitle[column];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using VB.Net I want to get a all datagrid cell values, then insert into
I want to get all values of a set interface in one go as
I want to get all values of 'id' attribute of 'span' tag with html
I want to get all the values(multiple) of a particular key.But i m getting
I want get all of the Geom objects that are related to a certain
I want to get the difference of two values within a time frame. so
I want to create an array of all the html elements within a div
I have an array, $scans. I want to query MySQL with all the values
i want query a file xml with linq, i want get all descendat of
I want to get all the Calendars, which are in my GoogleAccount, using the

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.