I tried this suggestion http://forums.sun.com/thread.jspa?threadID=5421037 but style cannot be found.
Is there any other way?
Lots of thanks, cancelledout
I tried this suggestion http://forums.sun.com/thread.jspa?threadID=5421037 but style cannot be found.
Is there any other way?
Lots of thanks, cancelledout
It depends on the version of JavaFX, I will suppose it is about 1.3.
By default, ListView
shows the result of toString()
applied to the objects stored in its items
variable.
But you can define a cellFactory
function that will generate a ListCell
that takes these objects and presents in a Node
holding whatever you put in, for example a Text
or Label
, or something more complex. So, there, you can format the text the usual way.
Now, if you don't want to go to that level of detail, just use CSS:
.list-cell
{
-fx-font: 18pt "Arial";
}