Center Contents Of A Vision List Component

Hello All,

I’m trying to center the contents of a List component in Vision. I was hoping to find something similar to what I would do with a label (using HTML tags <html><center>) but haven’t found any documentation on that. Is there anyone that can point me in the right direction or confirm that what I am trying cannot be done?

Thanks for your help on this!

I’m actually not really sure why the HTML method isn’t working, but with Vision, many things are possible. You could go from the component into it’s viewport, then view to get the actual JList component backing it. From there, you could call setCellRenderer() with an instance of ListCellRenderer that does whatever you want.

It’s not exactly the same, but you can get the same look with a one-column table if you uncheck the Header Visible property and make the Grid Line Color transparent.

The table customizer will let you pick Center for a column’s Horizontal Alignment.