This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Ordering Items in JList Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Ordering Items in JList" Watch "Ordering Items in JList" New topic
Author

Ordering Items in JList

aymane chetibi
Ranch Hand

Joined: Apr 12, 2006
Posts: 175
hello all,
I am not really a GUI designer, but these days I got to design some GUIs with JLists.
Well, My first question is what is the way used to set a JList header. for example we have 3 columns in jList, the first one is "Name", the second "Age" ....
My second question : is it possible to sort using these header items by clicking on them.


Also one question related to JPAnel, I want to display a notification in a jPanel that just appears on the button right of the screen and disapears by itself after 10 seconds. is this possible.


thanks a loooooooooooooooooooooooooooooooooooooooooooooooot guys.

regards,
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
A JList doesn't have columns - you will probably want to use a JTable.

Regarding your JPanel question, I didn't understand it. I would advise to start a new thread for it and give more information.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
aymane chetibi
Ranch Hand

Joined: Apr 12, 2006
Posts: 175
thanks a lot.
I did what you asked!
 
 
subject: Ordering Items in JList
 
Similar Threads
How to add a JPanel & JList to a JSrollPane
A few GUI questions
Displaying JPanel in a Jlist or JTable
item does not repaint within a list
Help sorting out what combination of layouts will provide the result I need