• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to change to +/- pointers??

 
Michelle Wang
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Sir:

I have JTRee code as below,



If I click any node to explore its children, the right handle pointer become the down handle Pointer, but if I hope to change this right handle pointer to + (plus) sign or icon; and to change this down handle pointer to - (minus) sign or icon; how to do it, ??
Please not use Icon or ImageIcon.
Is there any simplest way instead of using ImageIcon ???

Michelle
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Windows LookAndFeel uses plus/minus icons. You can set it for your application; shown here: How to Set the Look and Feel.
Otherwise, you may have to specify icons as discussed in this section of the JTree tutorial page: Customizing a Tree's Display which includes an image of a JTree rendered in the Windows LAF.
 
Michelle Wang
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
great!! sucess!! yes, it is what I need!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!