• Post Reply Bookmark Topic Watch Topic
  • New Topic

Disable an Element from JList  RSS feed

 
Mikasa Jaeger
Greenhorn
Posts: 24
Chrome Google App Engine Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a JList, and I want to disable only an Element from it.
Is there a method to disable an index from the Jlist or something?

Thanks
 
Paul Mrozik
Ranch Hand
Posts: 117
Chrome Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ouyeahh Manjon wrote:Hi all,

I have a JList, and I want to disable only an Element from it.
Is there a method to disable an index from the Jlist or something?

Thanks


So you want one of the JList items to appear disabled, or you just don't want it in there at all?
 
Mikasa Jaeger
Greenhorn
Posts: 24
Chrome Google App Engine Notepad
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want one that appears disabled, like: if you click there, it would be enabled again
 
Paul Mrozik
Ranch Hand
Posts: 117
Chrome Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, can you post some of your code?

What I would do is create a new class that implements ListCellRenderer.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!