Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-25-2012, 11:33 PM   PM User | #1
cortebert
New to the CF scene

 
Join Date: Nov 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
cortebert is an unknown quantity at this point
Java ArrayLists to GUI

I'm using a JFrame to make a program where you can search for music.
When you have searched it should show some info.
So i have 4 arrayLists(Name,Type,Price,Year).
These arrayLists need to be shown as a list in my GUI kinda like this.
( http://i.imgur.com/U5RW2.png )

Now my question is, What is the best way to show this?
Is it JTable?
cortebert is offline   Reply With Quote
Old 11-26-2012, 01:57 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,738
Thanks: 4
Thanked 2,464 Times in 2,433 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
You can't use 4x ArrayList as there isn't a real relationship between them. Use a Vector of Vectors, or you can write a custom TableModel to do this with. JTable does make the most sense for what you are trying to display though.
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Tags
arraylist, java, jframe, jtable

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:05 AM.


Advertisement
Log in to turn off these ads.