• Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding Padding to JComboBox  RSS feed

 
Michael Bunch
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know of a way to a some padding to the left side of the JComboBox so the entries are not butted right up against the left edge? I assume I would need to implement some kind of renderer but I don't know where to start. Also, I want the getSelectedValue() function to return only the text, not the padding + text. Any ideas?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> I assume I would need to implement some kind of renderer

 
Michael Bunch
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perfect!!! Thanks alot.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!