I want to add a JLabel in any Leaf of a JTree . I tried to use TreeCellRenderer but I don't know how to implement it properly.
Following is a sample code where I want to add a JLabel in the leaf of a JTree but I am not getting proper output.
JLabel because actually my application wants JTextPane , Combo Boxes and all . So atleast any of these implementation will show me the way to use other components.
I tried and I code as well . I just could not found some scenarios very clear like I added a JButton but how put action to that button. Similarly with JTextField and all other components.
If any link is there where sample codes are there , please provide me.
I tried but I am not able to add the action event to the JButton in the JTree . According to the example given , Under ROOT , there are 4 Menus and under Menu3 , there is a submenu as JButton , but action events are not working.
I posted in other forums as well because I am really not sure about the solution of my problem .
I did not know that these forums are related and my post will be considered as a cross post.