Keith Bennett

Greenhorn
+ Follow
since May 31, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Keith Bennett

I'm using the GTK version of Eclipse on RedHat Linux 8. I love it -- the refactoring and code assist features are amazing.
My only problem with it is that it is slow on my system -- but that might be my graphics configuration's fault.
- Keith
I think you could also do the following:
Create an array of employee objects from the collection of employees.
Write a custom ListCellRenderer that extracts the display string from the object and passes it to the default superclass' renderer. Call JList.setCellRenderer and pass it an instance of your renderer.
The nice thing about this is that, if I'm not mistaken, getSelectedValue() will return the employee object itself; there is no need to look up the object by the displayed name.
- Keith
20 years ago
I don't understand -- can't you called button.setEnabled(false) when you want to disable it and button.setEnabled(true) when you want to reenable it? (Or better yet, call setEnabled() on the javax.swing.Action.)
- Keith
20 years ago