JTree Behavior on Windows as opposed to other OSs

I have been noticing something very strange. I have written my code and compiled the code on Mac OS X (10.3). After having compiled the code, I find that all runs well. I take the same code, in a jar file and run this on Linux, Unix, etc... within a 1.4.2_x and a 1.5.x environment, and everything works fine. The problem, is when executing my code on Windows, I get an IllegalStateException error, node doesn't allow children. Why is this? Is there a better way of doing this?
Thanks,
M2bright
Scenario:
I have a blank JTree. I am then adding nodes dynamically to the JTree based off of user input. If the JTree is blank, I add it to the root node. The actual code that is failing is as follows:
  //Previous code for setup and manipulation is before this
// comp is a variable being passed in to the function.
if(((DefaultMutableTreeNode)((JTree)comp).getModel().getRoot()).getChildCount() == 0)
//This is the section where I make sure the root node allows children, works in every OS but windows.                 
((DefaultMutableTreeNode)((JTree)comp).getModel().getRoot()).setAllowsChildren(true);
                    DefaultMutableTreeNode defaultmutabletreenode = new DefaultMutableTreeNode(((DBEntry)obj).getVolume()); // getVolume() returns a string
                    DefaultMutableTreeNode defaultmutabletreenode2 = new DefaultMutableTreeNode(((DBEntry)obj).getBookShort()); //getBookShort() returns a string
                    DefaultMutableTreeNode defaultmutabletreenode4 = new DefaultMutableTreeNode(obj); //obj is a personallized object yet, has a toString()
                    defaultmutabletreenode2.add(defaultmutabletreenode4);
                    defaultmutabletreenode.add(defaultmutabletreenode2);
                    ((DefaultMutableTreeNode)((JTree)obj2).getModel().getRoot()).add(defaultmutabletreenode);
                    ((JTree)obj2).scrollPathToVisible(new TreePath(defaultmutabletreenode4.getPath()));
  //End Snippet

Select Tools / Options and remove the check for 'Open new windows in a new tab instead'

Similar Messages

  • Strange behavior of Windows Azure Compute Emulator (SDK 2.3)

    Today, after an update of the Azure SDK from 2.2 to 2.3, I noticed that only one of the two instances of my web role is started in
    the Azure Compute Emulator, the output of the Start-AzureEmulator is this:
    VERBOSE: Starting Emulator...
    VERBOSE: Role is running at http://127.0.0.1:81/
    Role is running at tcp://127.0.0.1:3389/
    Role is running at tcp://127.0.0.1:3389/
    VERBOSE: Started
    and only one instance is started in the Azure Compute Emulator.
    But in the past was something similar to this one:
    VERBOSE: Starting Emulator...
    VERBOSE: Role is running at http://127.0.0.1:81/
    http://127.0.0.1:82/
    Role is running at tcp://127.0.0.1:3389/
    Role is running at tcp://127.0.0.1:338/
    VERBOSE: Started
    and two instances were started.
    I already found this thread:
    http://stackoverflow.com/questions/13946634/strange-behavior-of-windows-azure-compute-emulator-sdk-1-8-with-multiple-role
    but it was not useful in my case (Microsoft.WindowsAzure.Common.WorkArounds.BindToAllIpsWorkAroundEnabled is False).
    Thanks in advance for any help.
    OS: Windows 8.1
    Azure SDK: 2.3
    Azure Compute Emulator: 2.3.0.0

    Hi,
    As far as I know, powershell didn't have a parameter to start azure emulator with full express, please try to use Command-line to test, refer to
    http://msdn.microsoft.com/en-us/library/gg433130.aspx for more details, if this didn't give you help, please feel free to let me know.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • What are the benefits of buying from Apple as opposed to other retail stores?

    What are the benefits of buying from Apple as opposed to other retail stores?

    You can buy from an Apple store, which has a 14 day return policy.
    You can buy on-line from Apple and get a new or refurb model (less $), and get engraving if you want it.
    Some retail stores have a more generous return (30 days?) policy.
    You can buy from an on-line Apple Authorized Reseller. I bought (with free shipping) mine from MacMall because I didn't have to pay sales tax. I paid with my American Express CC to get, for free, an additional 1 year warranty.
    Regardless of where you buy you still get the 30 day Apple Care and 1 year warranty. You can extend, for $, the Apple Care for 2 years. Or you can buy, for $, Apple Care +, which provides accidential damage repair insurance. There's also some 3rd party sources to buy the accidential insurance.
    Some retail stores and on-line stores offer a small discount or add a bonus item.
    It's your choice. Find the best deal.
     Cheers, Tom

  • I have two computers, one runs Windows 8.1, the other runs Windows 7.

    I have two computers, one runs Windows 8.1, the other runs Windows 7.  Can I put Premier Pro, or any of the suite, on both computers at the same time?

    Cloud License allows 2 activations http://www.adobe.com/legal/licenses-terms.html
    -Install on a 2nd computer http://forums.adobe.com/thread/1452292?tstart=0
    -Windows or Mac does not matter... 2 on the same operating system, or 1 on each

  • How I make to open html window pop-up over other opened pop-up ??

    Hi
    I need open many html window pop-up OVER other windows html pop-up.
    I made a javascript function, but it only open one window pop up.
    function NewWindow(mypage,myname,w,h,scroll,pos){
         if(pos=="random"){
              LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
              TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
         if(pos=="center"){
              LeftPosition=(screen.width)?(screen.width-w)/2:100;
              TopPosition=(screen.height)?(screen.height-h)/2:100;
         }else if((pos!="center" && pos!="random") || pos==null){
              LeftPosition=0;
              TopPosition=20
         settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
         window.open(mypage,myname,settings);
    What I have to do..to open one over one ??? And this haven't limits...on cascate.
    Sorry my mistakes, because I'm still learnning english language.

    "I made a javascript function, but it only open one window pop up"
    If you use the same name then the browser will not open a new window but just re-use the previously opened window. You will either have to not use a name or use a different name for each pop up.
    To get the new window to be on top get the handle to the new window and assign it the focus
    var win = window.open(mypage,myname,settings);
    win.focus();

  • I have a macbook pro. I recently upgraded it to mavericks. i also had windows 8 in the other partition. but now i accidentally deleted my mac os. how can i reinstall mavericks.? pls hlp me out

    I have a macbook pro. I recently upgraded it to mavericks. i also had windows 8 in the other partition. but now i accidentally deleted my mac os. how can i reinstall mavericks.? pls hlp me out

    paul dave,
    to reïnstall Mavericks on your 13-inch Mid 2012 MacBook Pro, you can try booting into Recovery mode by holding down ⌘R as your MacBook Pro starts up. Eventually it will show an OS X Utilities menu on the desktop; select Reïnstall OS X from that menu, and follow the instructions which it provides to reïnstall it onto its internal disk.

  • Physical memory cache behavior in Windows Server 2008 Enterprise

    I have a question regarding how windows manages the cache portion of phyiscal memory.  I have 2 servers which are identical OS configurations, hardware and experience nearly identical workloads.  Server 1 appears to use its cache a lot. I often
    see physical cache at at 75% of total memory (total is 16gb for both servers). I also see that the cache stays this high
    even when overall memory utilization is minimal (say approx. 3-4gb out of 16gb for long durations). I suppose this means windows memory manager is keeping pages in the cache because it anticipates it may need them again, but would overwrite them with
    new data if new processes needed it (I think of  this cached memory when the system is near idle as "available" but correct me if I am wrong?)
    Server 2 (again same workload and identical hardware, OS, configuration) doesn't appear to use cache as much. In fact, cache is always low round the clock (2 gbs usually) even when there is little to no memory utilization from processes outside the OS. Basically,
    it is low when the server is near idle, while the server 2 keeps it very high during the same period of minimal workload. Why the difference? Does this behavior sound normal?  Please advise. I am not a Windows Admin btw. I have a rudimentary understanding
    of memory.. or so I believe at least : )
    Thanks.

    Hi,
    Although both server are identical OS configurations, hardware and experience nearly identical workloads, there are still differences between them. We can use task manager on both server and Check which processes are using physical memory, please go through
    the below article to check more details about windows performance issue:
    Troubleshooting Windows Performance Issues: Lots of RAM but no Available Memory
    http://blogs.technet.com/b/mspfe/archive/2012/12/06/lots-of-ram-but-no-available-memory.aspx
    Regards,
    Yan Li
    TechNet Subscriber Support
    If you are
    TechNet Subscription
    user and have any feedback on our support quality, please send your feedback
    here.
    Regards, Yan Li

  • Strange LR3 Brush Behavior Closes Window.

    In the develope module where you select "crop, healing, redeye, GND and the adjustment brush" I get this behavior when selecting a new brush or tool that causes that window to close. It happens randomlly so it's been difficult to narrow it down to any one particular senario. For example, I will be working with the adjustment brush on an area of an image and want to choose a new brush to work another area of the image. I will click "New" and move to a slider to make an adjustment. When clicking on the slider, the window will close. I will have to click on the brush icon to reopen the window and start over. Again, this happens randomlly. Not all the time. It's not a huge deal but I would rather not deal with. Anyone have any idea of what might be going on here?
    Much appreciated, Devin

    Hello Beckx
    Welcome to the Intel iMac section of the forum.
    It sure would help us to help you if we knew what Mac you had and which version of OS X you were running.
    Installing the combo update over the existing version can and will solve many OS X related issues.
    If you have an Intel iMac and your running Tiger download and install the 10.4.11 combo update:
    http://support.apple.com/downloads/MacOS_X_10_4_11_Combo_Update__Intel
    The same applies if your running Leopard, download and install the 10.5.7 combo update:
    http://www.apple.com/downloads/macosx/apple/macosx_updates/macosx1057comboupdate .html
    Also note: that OS X only requires a single mouse click on the Menu Bar to activate the drop downs, then you should be able to slide the pointer across the menu bar to see all the drop downs.
    http://support.apple.com/kb/HT2473
    Dennis

  • SAP ECC 6.0 Behavior on Windows 2003 MSCS

    Dear Experts,
    I have SAP ECC 6.0 run on Windows 2003 Enterprise SP 64-bit Cluster (MSCS) and when we run testing on failover we got the following result:
    All cluster groups in node1 - Shutdown Node 1 - Node 2 Up
    - Whoever login to Node 1 will be disconnect during failover
    - Whoever login to node 2 and run transaction during failover will be hang till failover done successfully
    - Whoever login to node 2 and only run the transaction after the failvover done will not feell any disruption
    - New logon session is failed until basis is bringing online the following in cluster administrator under SAP Group (SAP SID 00 Service & SAP SID 01 Service)
    The same result if we shutdown Node 2 and all cluster group failover to node 1.
    Both services are install local in each node and start option has been made "manual"
    My question:
    1. Is the above result is common?
    2. Is there anyway to make SAP SID 00 & 01 to be automatic failover?
    Regards
    Rian W

    Hi Rian Wisandano,
    All your questions/queries looks common to me...
    In any given scenario, resources both SAP & DB based resoureces have to be online for you to access/logon to the system using SAPGUI. And it's very common that, unless resources (either service or instance specific) are online at cluster level the corresponding resources in SAP MMC won't be online. In your query one of that was, about 00 and 01 services, YES they are 2 different instances of your SAP build and corresponding entries at cluster level.
    And it's expected behavior that, while fail-over or fail-back of cluster resoureces from one cluster node to other cluster possible cluster node that, resources goes into offline and then mover over/move back and then comes online. So as its a thumb rule for given seconds/minutes (based on the resources) resources at cluster level will be offline before they come online. So during this time you will not be able logon to your SAP system because its not only cluster resoureces but also SAP MMC corresponding entries also will be offline....Along with cluster resources come online the resources/entreis in SAP MMC also comes automatically.
    And it's correct to setup, Cluster Service to 'Manual' in High Availabilty Setup.
    New logon session is failed until basis is bringing online the following in cluster administrator under SAP Group (SAP SID 00 Service & SAP SID 01 Service)
    The same result if we shutdown Node 2 and all cluster group failover to node 1.
    I hope this helps you to understand the behavior of cluster.
    Revert back if any further clarification required.
    Regards
    Sekhar

  • JTree behavior: very slow (horizontal) scrolling left/right

    Hello folks,
    I have an app that was very sluggish: primary a
    JTree in a JScrollPane in a JFrame (with a toolbar
    menu bar etc).
    Each node of the JTree has a user object "behind" it
    and I was able to implement HUGE performance increases
    by changing the toString() method to cache their
    representation when possible (99% of the time).
    Now 10,000 nodes scroll "snappily" up and down. Cool!
    Even with different icons drawn by the TreeCellRenderer.
    (also cached in a hash table).
    But now left/right (horizontal) scrolling is sluggish as
    heck.
    Ideas, kind friends?
    Be well !
    Eric

    Replying to my own post ...
    Discovered this behavior was introduced in
    JDK 1.3.1_01 ... the previous releases, 1.3.1 beta1,
    1.3.1 beta2, as well as the earlier 1.3.0.x, work fine.
    Eric

  • Safari behavior with MPEG-4 compared with other browsers

    Hi,
    Generated a .mov file using Quicktime Broadcaster and iSight. Converted to MPEG-4 using Quicktime(Pro). The .mp4 file plays fine using Quicktime Player on both Windows and MacOSX. Uploaded the .mp4 file to a web server and had the following behavior:
    Safari: displayed as a text file
    Firefox(Mac): gave option to save or open after saving, recognized an MPEG-4 Movie file
    Explorer6/7(Windows): Played fine using QT plugin
    Firefox (Windows): gave option to save or open after saving
    How can I change the Safari behavior to match Firefox or Explorer?
    Colin

    OPen mp4 in Quicktime. Save As QT movie (then has .mov extension). Safari and Firefox open with QT.
    OR
    use the correct html embed (object for IE) tags (see QT apple developer info) QT plays them fine.
    To put a file for download, try zipping it (archive in Finder) then post a link to the zipped file. THe user then just has to unzip it to recover it (haven't tried this yet.

  • WM_CAP_DRIVER_CONNECT strange behavior on Windows 7

    Hi,
    I'm sorry if this is not the right place to post my question, but I did not found one, maybe someone could suggest me.
    Anyway, I have some code for aquiring cam image using WM_CAP* messages.
    While it works perfectly on an XP machine, in Seven I have a lot of strange behavior.
    On the first call to
    SendMessage(hCapWnd, WM_CAP_DRIVER_CONNECT, DriverIdx, 0&)
    The "source Video" window appear, while on XP it return immediately true.
    Now I choose the source and I press OK but the SendMessage returns false!
    I try again and this time no window appear and the acquisition start normally!
    Then, I disconnect the driver and I try to connect again but the windows appear every time and SendMessage returns false!!!
    It make me crazy!! Please, could someone have some suggestions?
    Regards,
    Daniele.

    Daniele, I'm fighting the same problem as yours. I gave up at the first call to capDriverConnect. Didn't know it may succeed at the second shot.
    GetLastError reports 0 = ok.
    But there must be a way to succeed, because I started an app attached to the driver I use, and it works correctly, without the unwanted dialog. Can't check it right now, but it is probably the same app as here (if link does not work, just search for vbvidcap):
    http://www.natech-inc.com/names/other_programs/vidcap/index.html
    How does it go in your case?
    edit1: Sometimes there are problems if a window belongs to a different thread. Are you sure you call capDriverConnect from the thread that created the window with capCreateCaptureWindow?
    edit2: Sorry for the wrong hint. vbvidcap has the same problem. The app that works uses directshow, not vfw.
    edit3: Maybe the camera is reserved by some other application, or by unknown bug. Appearing of the "choose source" dialog is a sign of the blockage of the device, this works so on XP. In my case I resolved the problem by unplugging the camera and connecting
    it again. And the drivers must be ok. So I remain a believer of VFW :) Troublesome and awkward, but works!

  • Different look of button in jtree or jtable (windows/linux)

    Hi.
    I have jbutton on jtree(in jtable is the same problem) it looks like this on linux: http://mikel.pl/button.jpg .
    On windows eveyrthink is ok. I tried to set RaisedBevelBorder but in this case on windows button looks awful. Is any trick to get the same look of button without checking what system is running?

    Yes and no. Linux and Windows use different LookAndFeels by default, meaning the buttons are painted differently. Just setting the same border will not do in this case. The only way of having the application look exactly the same on both platforms is to manually set a LookAndFeel available on both systems. This should be the case for the MetalLookAndFeel, the SynthLookAndFeel and, I believe, for the Linux LookAndFeels as well.

  • HP PhotoSmart 6520, Printer offline, Wireless printing from Windows 8.1 and others

    My parents own an HP PhotoSmart 6520. They have 3 or 4 computers. 1 Is connected to this printer via USB cable. 3 Are "connected" over wireless. The printer has the latest firmware updates according to checks from the printer front display.
    Problem is this:
    1) When first starting the printer, and the printer gets on the wifi network, all wifi-available devices can print to it over wifi. We are also able to browse to the printer config web pages to see status, and change configs as needed.
    2) After about 5 minutes of printer inactivity, all wireless clients can't print to the printer to print, and can't connect to the printer's web page. (The printer appears to be offline to each OS that uses WiFi to get Internet access.
    3) If we visit the printer control screen, physically attached to the pinter, find the network configuration, and choose to "turn off" wifi at the printer, then after off, "turn on" wifi and see an IP address get assigned, then all WiFi machines can print to the printer over WiFi. However, after 5 minutes, again, the printer is offline. No matter what or how much each WiFi-based machine sends to their printer queue/spool, the printer remains offline.
    4) If the USB-connected machine prints to the printer over USB, the printer once again becomes available over the wireless network.
    The work-around is terrible. (Cycle WiFi access every time they need to print from Wireless devices.)
    Things we have tried:
    1) This is running the latest firmware according to the WebService section request to check for upgrades. They are on the latest according to the results. (no help)
    2) DHCP was the initial config for network settings. I moved to a DHCP server configuration with static IP served by printer MAC address. (No help)
    3) I switched to totally static IP address, thinking it might be a DHCP lease-time/renewal issue, or custom vendor string issues or bug. (no help)
    4) Enabled/Disabled IPv6 even though they are on a NAT-ed network with only IPv4 support. (no help)
    5) Visited printer config with web broswer, and change energy saver setting from "5 minutes" to "15 minutes" because the ~5 minute window seemed like an approximate time limit. (No help)
    6) Enable/Disable other settings through the web and restart the printer. (No help.)
    7) Suggestions listed here: http://support.hp.com/us-en/product/HP-Photosmart-6520-e-All-in-One-Printer-series/5169038/model/516... (No help)
    In testing this, with static IP or not, from other machines, when we can print over WiFi to the printer, the IPv4 address is ping-able from peers on the network. After ~5 minutes pass, and the pinter goes "offline" there are no ping replies to the static or other IP address assigned to this printer. By all accounts, when the printer is "offline" it really is no longer on the WiFi network. Meanwhile, oter devices can ping each other. (All computers, smartphones, tablets, etc can all respond to ping.)
    None of the other devices suffer from dropped access to the WiFi and Internet.
    Suggestions?
    I do not have access to this right now, but I can walk my parents through whatever steps are needed to resolve this.
    Thanks!
    P.S. Other things tried:
    http://h30434.www3.hp.com/t5/Printer-Networking-and-Wireless/If-your-printer-drops-off-your-network/...
    1) When online, generating report, reports online
    2) When offline, report reports that it is still associated with access point
    3) Printer is about 2 feet away from the access point it is communicating with and has max-bars showing signal strength.
    4) Channel allocation for WiFi was selected based on least used channel, and works very well for all other devices on this channel.
    5) There is only one accesspoint with the name it associates with.
    6) The only options for power-saving "auto-off" we see via web pages from printer are: 5 minutes, 10 minutes, and 15 minutes, and changing to 15 minutes does not allow the printer to remain online for 14 minutes -- it still goes offline to the network after ~5 minutes -- even agfter changing this settings and power cycling the printer.
    7) No wireless extender is being used.
    8) We tried static IP, Dynamic IP, and statically assigned DHCP served IP.
    Once printer is "offline" when visiting printer to tell printer to disable WiFi access, then re-enable it, all machines with items in their printer queue/spool *immediately* de-queue/de-spool their printer jobs to the printer.
    This is the closest description: http://h30434.www3.hp.com/t5/Printer-All-in-One-Install-Setup/Photosmart-6520-goes-off-line/td-p/324... Where is that patch?

    Hi @TheSynAck,
    I see you are using a Hot Spot, I believe we have found the reason for the connectivity issues. There may be a setting that needs to manually configured for the Hotspot to 'allow' your printer access. Also, hotspots may have limitations and restrictions that may cause connectivity issues.
    Take a look here: Setting up the Printer as a HotSpot, it shows a Laserjet but the same steps apply.
    Keep in mind that Hotspot connections are 'best effort' connections due to the issues of inconsistencies within the connection. They are not routers. Therefore, you may experience issues in the future when using the Hotspot for your connection. Usually a powercycle or hard reset of the HotSpot will resolve such issues.
    I would not recommend getting another Hot Spot as the connection is not guaranteed, you could however try a Wireless Router if you are looking to upgrade anyways.
    With the PS 6520 you also have the ability to print using the HP Wireless Direct printing option. Please click on the link below to get started:
    HP Wireless Printers - Printing with HP Wireless Direct
    I hope this gives you a better understanding of the intermittent connection issues.
    Thanks again,
    HevnLgh
    I work on behalf of HP
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to the left of the reply button to say “Thanks” for helping!

  • MacBook Pro does not boot when 'cold', Windows 7 on the other hand boots without any problem

    Hey everyone,
    I have a strange problem with my MacBook Pro mid 2009 13" running OSX Mavericks. For more than a year I have trouble booting my laptop. A 'cold' start (a fresh boot) usually ends with the prohibition sign on a grey back ground (starting in verbose mode results in the error message that the main drive could not be found). So far so strange.
    I have Windnows 7 installed as a bootcamp partition. If I start the laptop with Windows booting is no problem and Windows runs smoothly (what a terrible world we live in). If I let the laptop run for let say 10 minutes and restart the laptop Mac OS starts without any problems. (It doesn't work if I immediately restart after windows booted; also reinstalling Mac OS as a clean install from an external medium did not change the problem; disk utility always finds something to repair but neither discpermission repair nor disk repair got rid of the problem).
    As an additional comment a WD 500GB Scorbio Blue replaced the original hard drive about a years ago. I had no problems with the hard drive initally and I can't really believe that there is a problem with the hardware, I mean, why does Windows start and Mac OS doesn't?
    Thanks for your time and help!
    Marco

    This isn't a direct answer to your issue but have you considered installing Wine so you can run the occasional windows app directly in OSX? It's a much more elegant solution IMHO. This avoids restarting all the time with Bootcamp and avoids crashing all the time (and the security risks) with Windows running.

Maybe you are looking for