aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to create a horizontal JList? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to create a horizontal JList?" Watch "How to create a horizontal JList?" New topic
Author

How to create a horizontal JList?

Qusay Jaafar
Ranch Hand

Joined: May 06, 2002
Posts: 127
I need JList into a GUI but I need to scroll its elements horizontally not vertically.
just consider its element (right now) as one object.


Qusay
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
Check out the information for the setLayoutOrientation method in the Method Details section of the JList api.
Qusay Jaafar
Ranch Hand

Joined: May 06, 2002
Posts: 127
thanks for that.
my second question is:
consider these information:

first name
last name
address
email
phone

I want all those information to be in one element. when the user scroll to another element there will be another information for another person.
How can achieve that?
Qusay Jaafar
Ranch Hand

Joined: May 06, 2002
Posts: 127
any idea please?
Kriti Garg
Ranch Hand

Joined: Sep 13, 2004
Posts: 50
Hi,

I think OOPS will help u out of this problem

Make a class like Employee or Person

with variable like Name,phone etc what u need.

in your JList add this Object and in
the Class toString() method return Name+Phone+...; etc

Use Default List model if necessary.

addElemet takes Object as argument .


BBye
Kriti.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to create a horizontal JList?