This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JList class  RSS feed

 
Chris Stewart
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see it takes an array of objects as a parameter. Does anyone know how I can use something like \t to format that text properly? I tried formatting the items with \t and it isn't working.
 
Tom Purl
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please post some of the code that you tried?
 
Chris Stewart
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Creating the list:

Here is the method that creates a new Student, the returned Object array is passed to the JList as the new data source. Right now I've just added spaces between each attribute, but I really want to have tabs.
 
Dirk Schreckmann
Sheriff
Posts: 7023
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!