how to set mutable cell width and height in a jlist?
Hello,
i wrote a jlist cell renderer object to able to render a jlabel for the unselected items and a wide and high jpanel with images when an item is selected.
The jlist render all items at the same dimension.
How can i change this built-in behavior?
i printed the items preferedsize:
java.awt.Dimension[width=340,height=140]
java.awt.Dimension[width=275,height=75]
java.awt.Dimension[width=275,height=75]
java.awt.Dimension[width=275,height=75]
java.awt.Dimension[width=275,height=75]
java.awt.Dimension[width=275,height=75]
java.awt.Dimension[width=275,height=75]
Message was edited by:
fazekaim
ok, i give for every index pos a fix jpanel object, and it is working.
What i would like is a mouse selection and the selected item/cell should be rendered by a component with different dimension (containing more information). but this doesn't work.
Is it possible, that the JList cashes the cells dimensions?
Message was edited by:
fazekaim
Message was edited by:
fazekaim

