This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
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.
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
> If any link is there where sample codes are there , please provide me.
there's plenty in the link
there's plenty on this site
there's plenty at google
if you really can't get started, pay someone, or change careers
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.
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
luckily I saw your cross-post before I posted a solution
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.