I have a problem with creating a node in the JTree
Hello All!
I have a problem when I try to create a new node in the JTree. If the parent node of the new node has any other children, I get following NullPointerException exception :
java.lang.NullPointerException
at javax.swing.plaf.basic.BasicTreeUI.startEditing(BasicTreeUI.java:1959)
at javax.swing.plaf.basic.BasicTreeUI.startEditingAtPath(BasicTreeUI.java:506)
at javax.swing.JTree.startEditingAtPath(JTree.java:1921)
at ru.sirena2000.jxt.iface.action.TreeActionHandler.createNode(TreeActionHandler.java:62)
It seems to me, that path of creating node was not defined in the BasicTreeUI.
Note, if the parent node has no other children, the new node will be successfully created. How can I solve this problem? Help me, please!
I use java version 1.4.2-b28
Sorry, I forgot to show a piece of code, where I try to create a new node. This piece of code see above. "tree.scrollPathToVisible(path);" is a string, which throws an exception.
tree.repaint();
TreePath path = tree.getSelectionPath();
if (path == null) {
return;
if (tree.isCollapsed(path)) {
tree.expandPath(path);
DefaultMutableTreeNode parentNode =
(DefaultMutableTreeNode)path.getLastPathComponent();
IconData childData = defineIconData(parentNode);
IconData newData = childData.copy();
newData.getNodeObject().clearNodeObj();
newData.getNodeObject().setNodeText("New");
DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(newData);
editingData = newData;
editingData.getNodeObject().setStatus(TreeNodeData.NEW_STATUS);
parentNode.add(newNode);
DefaultTreeModel model = (DefaultTreeModel)tree.getModel();
path = path.pathByAddingChild(newNode);
tree.scrollPathToVisible(path);
tree.startEditingAtPath(path);
saveChangesInBuffer(newNode, TreeNodeData.NEW_STATUS);
model.nodeStructureChanged(parentNode);
Similar Messages
-
Hello I have a problem with my ipod touch 1G the problem is that see me key to the floor! And when recogi not prendia after 5 minutes prendio but it gave to me the surprise of which the battery had finished completely! What I did was to set it to load with the USB but do not load the battery me the icon of the battery appear and below of her the beam that indicates that this being loaded but this way I have left it the whole yesterday and what goes of today and continues without loading anything! They can help me porfavor I am grateful for them to him very much! And my PC does not detect it not itunes
Try the not-charging topic of:
iPod touch: Hardware troubleshooting
It could be that the battery is dead. -
I have a problem with itunes when I sync the saved music and want to sync my iphone 5 ios 7.0.6 no longer passes the music thing is that just stays on "waiting for sync" and not worry please help are more than 400 songs that do not want to hear who are wi
Plawexki wrote:
... do you know if the contacts, photos, messages etc will be wiped?
Yes... Everything will be Wiped and Replaced with what is currently on Your Mac.
SYNCING with iTunes
See here > http://support.apple.com/kb/HT1386
From Here > http://www.apple.com/support/iphone/syncing/
You may find this information of interest...
Have a read here...
https://discussions.apple.com/message/18409815?ac_cid=ha
And See Here...
How to Use Multiple iDevices with One Computer -
i have a problem with my MacBook Pro is the almost of my app not working at all like a app store and terminal and other important apps please if u can help me as fast as you can cuz i don't wanna format it that's why am on Mac now not win ?
Abdussalam.A,
you mentioned that Terminal does not work at all for your MacBook Pro. What currently happens when you run Terminal? In what way does it not work? -
Hello, I have a problem with iPhone 5c softhware update ( The iPhone "iPhone" could not be restored. An unknown error occurred (27))
Error 1 or -1
This may indicate a hardware issue with your device. Follow Troubleshooting security software issues, and restore your device on a different known-good computer. If the errors persist on another computer, the device may need service.
The" may need service' meand there is a hardware problem. In that case make an appointment at the Genius Bar of an Apple store.
Apple Retail Store - Genius Bar -
I have a problem with opening downloaded files from the internet; zip types. Can you tell me an app to open these types of formats of files?
It should unzip if you double-cick.
What are you seeing happen when you do that?
Select a .zip file in the Finder and Get Info (cmd-i). What is set for it to Open With. It should be Archive Utility. -
I have a problem with my iPad 1 st. the problem is that I unable to locate even when connected to a WiFi network and the location is activated and restore and same thing happens .. may be I need help!
Thank you ...!Hi there beni_m,
You may find the troubleshooting steps in the articles below helpful.
iOS: Not responding or does not turn on
http://support.apple.com/kb/ts3281
iOS: Device not recognized in iTunes for Mac OS X
http://support.apple.com/kb/ts1591
iOS: Device not recognized in iTunes for Windows
http://support.apple.com/kb/ts1538
-Griff W. -
Not everybody are advanced in use of different devices. I have problems with everything, now trying to move my I tunes to my ny PC. I reccon it would be easiest by using i Cloud. But I am even not able to create an account.
Can somebody help?stf10 wrote:
... trying to move my I tunes to my ny PC. ...
From where are you trying to move your iTunes... -
Pleas help. Thanks.
There are any number of possibilies... you could have problems with runaway applications, causing your machine to overheat and setting the fans off, you could have bad fan sensors, etc.
Open Activity Monitor (Applications>Utilities) and see if you have any apps that may be hogging the CPU. Call back.
Clinton -
My printing process is so slow, it often completely dies in the middle of printing. Sometimes it wont print at all, and even more often, the editor will not even open. I have uninstalled and reinstalled this program about a dozen times. All I want is a version of this program that works the way it is supposed to - when it is supposed. Adobe is so freaking impossible to contact.
If you mean movies you have exported from iMovie HD, those can be imported easily. If you mean iMovie HD projects opening in iMovie '11, I don't see many people have much success with that.
-
I have a problem with my file syncing in the cloud.
I am working on a project in my mac and I needed to travale but still finish my project, so I decided to upload the files in the cloud and now I just find a few files there. Can somebody help me with this problem? I nedd those files because I just have 3 days to finish the project.
File Sync Links that may help... all the links I have, since I don't know the cause of your specific problem
-https://forums.adobe.com/community/creative_cloud/host_sync
-http://helpx.adobe.com/creative-cloud/help/sync-settings.html
-http://helpx.adobe.com/creative-cloud/kb/arent-my-files-syncing.html
-Size Limits https://forums.adobe.com/thread/1488242
-sync and email link http://forums.adobe.com/thread/1427516?tstart=0
-Phantom folder problem https://forums.adobe.com/thread/1490445 -
Hi I use CA Internet Security Suite which checks ALL pages and searches, but it does not work with this version, also I wish to use Goggle Toolbar which ALSO does not work with this version where can I get the previous version? As my harddrive crashed I have had to install windows 7 and this version doesn't seem to allow me to change my homepage, why is this? Cheers Ernest
You can get the latest version of Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html
Mozilla are working to prevent Mac users with non-compatible systems from getting the notification about Firefox 4, and also not displaying the "Download Firefox 4" button on http://www.mozilla.com -
So anyways, I was trying to make a Sprite animation using Adobe Flash Cs4 Professional. And While someone gave instructions on how to do so on Youtube, it said to use the Trace Bitmap tool in the top where tools are listed. So when I click, a downloading bar pops, and its loading so it can load it and do whatever the Trace Bitmap tool does. So anyways, when its like half-and-a-quarter done, one quarter stopped downloading, and to exit Adobe Flash Cs4 Professional, I have to activate Task Manager, and the tool dosen't work, help please.
Did the Flash plugin crashes also happen with a previous version (10.1) of the Flash player?
If you have submitted Breakpad crash reports then post the IDs of one or more Breakpad crash reports (bp-xxxxxxxx-xxxxxxxxx-xxxx-xxxxxxxxxxxx).<br />
You can find the IDs of the submitted crash reports on the <i>about:crashes</i> page.<br />
You can open the <b>about:crashes</b> page via the location bar, like you open a website.
See:
* http://kb.mozillazine.org/Breakpad (Mozilla Crash Reporter) -
i need some one to help me because i cant get ana app to download it says it will be downloaded when u login to your account but in already loged on
You don't download apps from the iTunes app store with Safari.
-
Besides this problem when I select another song's the same problem
Have you tried to click on "repair" and then try to uninstall the component?
Maybe you are looking for
-
I'm trying to update iOS 7 and it says I need 3.4 GB of storage to update.. I currently have on my storage 797 MB and 12,6 GB used. How much storage should it write for me to be able to update?
-
Hi everybody I have an object type defined in oracle and I attached that type to one of my tables as a type of a column in that type, assume addr type and table customer with column address and its type addr. In BC4J , I created a domain for the type
-
How to write files to the filesystem with portal/plsql
Hi, is there a way to write files to the filesystem via Portal? Or can i call an external programm (perl, php) to do so, while portal writes further information to database? thank you for the help Ralf Schmitt
-
Can you customize and add logo's to a back page or cover?
I was hoping I could further customize a book by adding my logo and contact information to the back page or front cover (corner) of an iphoto book - any suggestions? Is it possible?
-
last week Aperture started behaving awkwardly. It started filling up my HD on my Macbook. About 1GB per day extra. I started cleaning up Aperture projects and deleting masters and versions of bad pics. All of a sudden I've lost about 10 projects. I c