Re: JList customized with TreeSet
You need to look into:
Look at the example at the top of JList javadoc. Specifically look at the
"Oni" <email@example.com> wrote in message news:firstname.lastname@example.org om...
> Hi there!
> I have a TreeSet of TreeSets which I need to display in a JList
> The elements of the TreeSets are Strings.
> I need to display the JList with TreeSet.size() cells and in every
> cell I want to have the representation of the every TreeSet by
> drawing a rectangle(filled with different color) for every element of
> the current TreeSet.
> In addition, I would like to print the Strings on top of this
> rectangles and the selection event for the list as well.
> I am trying to sort this out with DefaultListModel and
> ListCellRenderer, but I really don't know exactly how to use them to
> get the desired outcome.
> I am not necessarly sticked to JList, but I want this visual
> representation with rectangles in a scrollpane anyway.
> I would really appreciate a lot any idea, suggestions or even pieces
> of code.
> Many thanks in advance.
|All times are GMT. The time now is 10:21 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.