What is the equivalent of a C# gridview in java GUI?

11,317

I fetch a list of records from a collection(table) and display the information.

See the section from the Swing tutorial on How to Use Tables for the basics of displaying data in a tabular format.

I want to display only few descriptive columns but when the user selects a record(row) he would get the entire info

You will need to create a custom TableModel to do this. See the JButtonTableModel.java example from Row Table Model for an example of how you can control the columns of data you want to see. The RowTableModel does most of the work for you, you just need to implement a couple of methods.

Share:
11,317
Snedden27
Author by

Snedden27

A rookie programmer , trying to learn more about computing

Updated on June 14, 2022

Comments

  • Snedden27
    Snedden27 almost 2 years

    I am trying to learn java, I am working on a simple program where I fetch a list of records from a collection(table) and display the information.

    I want to display only few descriptive columns but when the user selects a record(row) he would get the entire info on that particular record in some other jframe or dialog box(not sure how I gonna go from here).

    I did work on C# and asp a bit ,I am looking for something similar to a gridview in c# ,

    PS:It would also help if you guys give me some sort of pointer how exactly I would do this..

    Thanks.