• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

JTree refresh problem

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi frenz... i have a problem regarding JTree and JToolBar... what i m doing is..when my application starts i m making a GUI which contains a panel which shows a JTree and JMenu and JToolBar. JTree is constructed from nodes which is constructed from fields from database.. thus the nodes(objects) are created when applications starts. in the JToolBar and JMenuBar, I m using actions to which I m sending this JTree as parameter. these actions are using this JTree to perform Operations. these operations include adding Nodes to JTree. I m able to do that..i.e. adding nodes to JTree model and Database and the node is successfully added in JTree but the problem is after adding or deleting the nodes when I check for the parents , they contain same elements as when the application started.. when I restart the application all the data is again fetched from database and JTree is constructed. The problem is obvious that i passed the JTree, which i constructed when the application started, as argument and it is still working on that.. what i want is that whenever any change occurs in JTree i.e adding or deleting , changes should be applicable from that very moment.. I m troubled by this.. plz help with detailed and clear example.
thanx in advance
Sandeep
[ September 16, 2005: Message edited by: Michael Ernest ]
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please read this.
 
sandeep kumar jangra
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry gregg... i too want people to answer my question when they have time.
but atleast i can request... that was a request...anyhow I wont be using dat word. but plz go through my problem and answer
thanx
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a certain irritation factor at reading through posts and seeing many of them marked "urgent.' I've edited that portion out of the topic title as a courtesy to all readers.

You might also format your request so that it is easier to read. If a post looks like a long, solid block of text -- especially one full of shorthand spellings -- most people will pass over it.

Regards,
 
sandeep kumar jangra
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanx everybody for making me learn the way to post topic. plz bear with newbies

hi frenz... i have a problem regarding JTree and JToolBar...
what i m doing is..

when my application starts i m making a GUI which contains a panel which shows
1) JTree
2) JMenu
3) JToolBar.

JTree is constructed from nodes which is constructed from fields from database.. thus the nodes(objects) are created when applications starts.
(by connecting to database).

In the JToolBar and JMenuBar, I m using actions to which I m sending this JTree as parameter. these actions are using this JTree to perform Operations. these operations include adding Nodes to JTree. I m able to do that..i.e. adding nodes to JTree model and Database and the node is successfully added in JTree view but the problem is after adding or deleting the nodes when I check for the parents , they contain same elements as when the application started..


when I restart the application all the data is again fetched from database and JTree is constructed. The problem is obvious that i passed the JTree, which i constructed when the application started, as argument and it is still working on that parameter.. what i want is that whenever any change occurs in JTree i.e adding or deleting , changes should be applicable from that very moment.. I m troubled by this.. plz help with detailed and clear example.
thanx in advance
Sandeep
 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic