• Post Reply Bookmark Topic Watch Topic
  • New Topic

Mouse Events not happening with MultiColumn JList Objects  RSS feed

 
Mohammad Arif Mustafa
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, i have added a class Object Record in JList, whichever(Record extends JPanel) contains two components i.e. JLabel & JComboBox,
but the issue pertained with me, that i am unable to call those component events (like MouseEvent for JLabel & JComboBox not dragDown
for showing items),

static class RecordCellRenderer extends JPanel implements ListCellRenderer

please help a bit to recognise my issue asap, thanks in advance.
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Muhammad, and welcome to the Ranch!

A renderer is only used for painting; the renderer components are NOT added to the component being rendered, so cannot receive input events. A better choice for you might be JTable.

Since this pertains to Swing, I have added it to the GUIs section.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!