Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not sure how to word this question. Best guess: Is combining JCheckBox and JTextArea possible?

 
Bd Howard
Greenhorn
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'd like someone to point me in the right direction. I am not sure how to word my question so I can make an accurate search.

In my program, I have it so the user can drop a folder onto a JTextArea (housed inside a JScrollPane) and the contents of that folder (each file name) are listed in the JTA. I want to have a JCheckBox immediately to the left of each name, so the user can select one of the files for special treatment.

I've seen this done in email programs, so the user can select more than one message, but I don't know what this combination of components is called. Could someone shed some light on what I should be searching for in order to implement this?

Thanks,

BD
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
might be easier to use a JTable/JScrollPane combo.

you can have headers if you want, or not.
you can have gridlines if you want, or not.

even a JList/JScrollPane would be better than a JTextArea.
 
Bd Howard
Greenhorn
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Michael. I've been using JTA lately, and I guess I am in a rut. Never considered using anything else.

Your JTable suggestion has allowed me to get some good hits on my search. Thanks a bunch.

BD
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic