It's not a secret anymore!*
The moose likes Swing / AWT / SWT and the fly likes tree not getting updated on Linux ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "tree not getting updated on Linux ??" Watch "tree not getting updated on Linux ??" New topic
Author

tree not getting updated on Linux ??

Jeevan Anand
Greenhorn

Joined: Jul 02, 2008
Posts: 13
I am working on messenger.

I am finding the different behavior when I launch the client on linux/ solaris.

When I subscribe a buddy, the buddy should appear in roster(buddy tree).

Its working on solaris, windows but not on linux(all flavours) ??

any clues ??
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36478
    
  16
Don't know. But you will be more likely to get a useful answer if you Tell The Details.
Jeevan Anand
Greenhorn

Joined: Jul 02, 2008
Posts: 13
Ok, I will give more details:

I m working on instant messeger like gtalk, pidgin.

Once I log in using msn gateway/ aim gateway for msn user/ aim user, i get subscription request for user's buddies. If i approve request. the buddies should be added in roster (tree).

In my case, the same behavior found for windows, solaris, but linux the behavior is different. If i approve request. the buddies are not added in roster (tree). There is no exception thrown. The information about buddies added is recieved at messenger's client but buddies are not shown on UI.
[ November 09, 2008: Message edited by: Jeevan Anand ]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

What tree model are you using?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Jeevan Anand
Greenhorn

Joined: Jul 02, 2008
Posts: 13
I am using JTree, with DefaultTreeModel, visitor pattern....basetreenode extending to DefaultMutableTreeNode.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

Don't say a thing - you're adding these nodes directly to the parent node.

If you would use your model's insertNodeInto method (and removeNodeFromParent for removing) then the model should fire the right events, and the table should get updated properly.
Jeevan Anand
Greenhorn

Joined: Jul 02, 2008
Posts: 13
no. I m not adding these nodes directly to root, there is a child node to tree root node , and then teh leaf nodes are added to this child node. I am not finding the leaf nodes added.
[ November 09, 2008: Message edited by: Jeevan Anand ]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

I didn't say root, I said parent node. In other words, you are calling "parentnode.add(childnode)". If you change that to "model.insertNodeInto(parentnode, childnode, model.getChildCount(parentnode))" it should work.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tree not getting updated on Linux ??
 
Similar Threads
Solaris/Linux - Swing JTextPane Problem
awt on unix
Editor for linux
Swing JTextPane on Solaris/Linux
installing Unix