Reputation: 104
I am a student making a scatterplot program that uses user-made datasets. Each dataset is a collection of entries, with a Name, X value, Y value, and Subset (string). I want to make a JFrame scroll window where the user can scroll through a list of sorted entries to delete and possibly edit them, i have attached a basic illisturation to help explain what im looking to create. My Question is how would i go about doing this? Should i use some kind of container to house rectanglular data panes that i create? My UI experience is fairly limited as i am just a student so appologies if i dont understand
Upvotes: 0
Views: 158
Reputation: 324098
Each dataset is a collection of entries, with a Name, X value, Y value, and Subset (string). I want to make a JFrame scroll window where the user can scroll through a list of sorted entries to delete and possibly edit them,
I would use a JTable
. It is a Swing component designed to display data in a row/column format. A JTable
supports editing of the data and rows of data can easily be removed from the table when you use the DefaultTableModel
.
Check out the section from the Swing tutorial on How to Use Tables for more information and working examples to get you started.
Upvotes: 2