Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to change the name of root in JTree at my will  RSS feed

 
Suhaas Verma
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
i am trying to develop a simulation of windows explorer in swing.
at first my application will ask the user the directory name or the drive name.
so depending on the user input i have to display the explorer in JTree.
now i want to name the root of the JTree same as the drive or directory name provided by the user.
i mean
i've done like this
first i have created a textfield and a button;
now the user will enter the directory name or the drive name in text field..and press the button..
as soon as the user presses the button the directory name or the drive name will appear as the root in JTree and the children will be its content files.
i am unable to do it.
help me.
thanks in advance
[ May 12, 2007: Message edited by: Suhaas UNDEFINED ]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> now i want to name the root of the JTree same as the drive or directory
> name provided by the user.

 
Paul Clapham
Sheriff
Posts: 22374
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Suhaas UNDEFINED", welcome to JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must contain your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names will be deleted.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!