How to create a JTree in a separate thread?

Hi. I am writing a Swing application which has a JTree that is made up of company parent nodes and employee child nodes. My problem is that the data for this JTree is loaded from the database and this process takes a long time making the loading time of the app too slow. I think that this process should probably be done in a separate thread. This would let the gui load much quicker and then when the thread finishes it can update the graphics to display the JTree. I have the code for the JTree all done and it works but I need help on putting it in a separate thread and running the thread. I am having trouble with this. Any help would be greatly appreciated.
Eugene P.

Thank you for responding to my question but I actually figured out a solution already. I used the SwingWorker class. When the program loads I just display a simple JTree with just the names of the companies without the employees. This takes almost no time to load. Then in the construct() method of the SwingWorker class I run the query to get the employee names and then create the new JTree that has the firms and the employees. In the finished() method of the SwingWorker class I update the gui. This whole process is running in a separate thread while the gui is already loaded so it works beautifully.

Similar Messages

  • How can create a JTree with cellRender is checkbox realized multiple selec

    How can create a JTree with cellRender is checkbox realized multiple selection function.thanks for every
    one's help.

    Hi,
    1. Create a value node in your context name Table and set its cardinality to 0:n
    2. Create 2 value attributes within the Table node name value1 and value2
    3. Goto Outline view> Right click on TransparentUIContainer>Apply Template> Select Table>mark the node Table and it's attributes.
    you have created a table and binded its value to context
    Table UI properties
    4.Set Selection Mode to Multi
    5.Set Visible Row Count to 5
    6.ScrollableColCount to 5
    In your implemetaion, you can add values to table as follow:
    IPrivate<viewname>.ITableElement ele = wdContext.nodeTable().createTableElement();
    ele.setValue1(<value>);
    ele.setValue2(<value>);
    wdContext.nodeTable().addElement(ele);
    The above code will allow you to add elements to your table node.
    Regards,
    Murtuza

  • How to create a JTree using a tree of my own

    Hello,
    I have an object which has a tree structure.
    I want to create a jtree that will hold the data from this tree of my own. I also want to be able to customize how nodes are rendered and to add a context menu with options like ADD/Remove/Move....
    Can you point me to a good tutorial?
    Can you help me?
    Thank you very much for your asistance.

    carstos,
    See this article for a not-extremely-well-written, but still useful, intro to trees:
    http://java.sun.com/products/jfc/tsc/articles/jtree/index.html
    After that see the Swing Tutorial at http://java.sun.com for specific help on popup menus, etc.
    --A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to stop Native Meto running in separate thread?

    I have a long working NM and run it in separate thread using SwingWorker class. If I want to stop that metod, i use interrupt(), but it seems to be a wrong way. It looks like NM go on working, and when I call other NM it throws an Access Violation Exception.
    Is there any ideas?
    Thank you. Charis.

    The interrupt() method does not stop the thread. It sets a flag. Are you checking that flag in your native code?

  • How to create a DVD with 2 separate movies?

    I'm a coach - and as I break down game film for my team, I'd like to distribute a single DVD with an Offensive film and a Defensive film, on a single DVD.  Once I edit the original clips, I usually have about 20 minutes of offense, and 25 minutes of defense.  Is it possible to open a DVD menu, in PE and just drag/drop my two films into the menu?  I've already made the separate films - just can't find a way to put them on the same DVD - with separate launch buttons.
    Please advise - thanks.
    Coach B.

    Coach B
    In Premiere Elements, it is the placement of the menu markers at the Timeline level in Edit that is going to be the important first step. There placement at the Timeline level will determine how they are represented (linked to) the buttons in the menu(s). The menu markers for this are going to be main menu markers and stop markers as per details.
    1. Setting up the Timeline.
    Place a main menu marker at the start of the first file of Offense Section.
    Place a stop marker at the end of the last file of Offense Section.
    Leave a few frames gap between the end of the Offense and the start of the Defense.
    (You cannot sit one marker on top of another)
    Place a main menu marker at the start of the first file of Defense Section.
    DO NOT place a stop marker at the end of the last file of Defense Section.
    2. As shown in the blog post to which I referred you for background information, there are two types of buttons we could use for Offense button and Defense button on the main menu. Let us start with using just the thumbnail type button.
    For now we will be assuming the end product as DVD-VIDEO Standard (4:3) on DVD disc.We will use the Sports/(AV)Extreme theme and do some file switching.
    a. You need to get copies of the following files from the Program Data
    sportchannel_pal_s_sm.psd
    sportchannel_pal_s_mm.psd
    They are copied at their saved located
    Local Disk C
    Program Data
    Adobe
    Premiere Elements
    11.0
    Online
    DVD Templates
    All_Lang
    Sports
    and in the Sports Folder are those two files cited above which you copy and paste to an empty folder that you created on the computer desktop.
    b. Switch the file names so that the main menu has the scene menu design and vice versa. And, modify the names so that you do not mix up these modified files with anything else.
    So, you want to end up with a folder name mysportchannel on the computer desktop
    and in that folder are the two files who names you switched and changed.
    sportchannel_pal_s_sm.psd is changed to mysportchannel_pal_s_mm.psd
    and
    sportchannel_pal_s_mm.psd is changed to mysportchannel_pal_s_sm.psd
    Take the desktop mysportchannel folder with these modified files and place it in the following spot in the following path...
    Local Disk C
    Program Files
    Adobe
    Premiere Elements
    11.0
    DVD Templates
    Common
    and in the Common Folder place the mysportchannel folder.
    When you go to select this theme in the Movie Menu customization of the opened project, look under the Slideshow catagory.
    You should be looking at something like this in the Movie Menu customization area
    Lots ot fine tuning yet to be done, detail wise.
    1. Is your end product, DVD-VIDEO standard 4:3 or widescreen 16:9.
    2. Do you want the music background that comes with the original main menu?
    3. Do you want a Play All opportunity? This one allows for pick one or the other then return to the
    main menu.
    Please review the above. Do not hesitate to ask for clarification.
    Thanks.
    ATR

  • How to create a JTree in which only leafs are selectable

    It took me a while and some effort to find a way to make a JTree in which you can only select the leafs.
    I'm posting the example in case someone is interested. This might be helpful.
    myJTree.setSelectionModel(new DefaultTreeSelectionModel() {
         public void setSelectionPaths(final TreePath[] paths) {
              boolean okToAdd = true;
              DefaultMutableTreeNode selectedNode;
              for (int i = 0; i < paths.length; ++i) {
                   selectedNode=(DefaultMutableTreeNode)paths.getLastPathComponent();
                   if (!selectedNode.isLeaf()) {
                        okToAdd = false;
                        break;
              if (okToAdd) {
                   super.setSelectionPaths(paths);
         public void addSelectionPaths(final TreePath[] paths) {
              if (getLeadSelectionPath() == null) {
                   super.addSelectionPaths(paths);
                   return;
              boolean okToAdd = true;
              DefaultMutableTreeNode selectedNode;
              for (int i = 0; i < paths.length; ++i) {
                   selectedNode=(DefaultMutableTreeNode)paths[i].getLastPathComponent();
                   if (!selectedNode.isLeaf()) {
                        okToAdd = false;
                        break;
              if (okToAdd) {
                   super.addSelectionPaths(paths);

    For this to work in PDF the client ither needs Acrobat Pro or you need to create a PDF form (which has it's disadvantages concerning design)
    In any way PDF is not actually meant for editing. The editing functions in Acrobat have their disadvantages as well if carefully set type is what you're after.
    A vector file simply can't be protected.
    Make a contract.

  • How to create a toolitip with JLabel with thread

    hi,
    i need to create a tooltip which, when i focus on a button the label should appear from the bottom of the window and slowly it should move up to some range.it setted null layout to the frame.
    can any one tell me here is code goes using thread
    public void run()
    try{
    for(int i=700;i>600;i=i-10)
    final int y=i;
    try {
    Thread.sleep(1000);
    javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
    public void run() {
    la.setText("df"+y);
    la.setBounds(300,y-50,500,400);
    catch (Exception e) {}
    System.out.println(i);
    }catch(Exception e){}
    advance congrats to the candidates.

    {color:#ff0080}Multi post - including this --
    {color}{color:#0000ff}http://forum.java.sun.com/thread.jspa?threadID=5222831
    http://forum.java.sun.com/thread.jspa?threadID=5221700
    http://forum.java.sun.com/thread.jspa?threadID=5221761
    http://forum.java.sun.com/thread.jspa?threadID=5130970{color}{color:000080}
    db{color}

  • Export from Crystal Reports 2008 viewer fails if run on separate thread

    I have a windows desktop application written in Visual Basic using Visual Studio 2008.  I have installed and am trying Crystal Reports 2008 to run a report.  Everything seems to work well except that when I preview a report (using the viewer control) and click the export button found in the upper left corner of that control, I get the following message:
    Error 5: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made.  Ensure that your Main function has STAThreadAttribute marked on it.  This exception is only raised if a debugger is attached to the process.
    I am a little confused on what to do exactly.  Is the problem because I am running in the Visual Studio 2008 IDE?  It says this exception is only raise if a debugger is attached to the process.  No, I tried running it outside the IDE.  The exception wasn't generated but the application hung when the button was clicked.
    It says the current thread must be set to single thread apartment (STA) mode.  If the report is run on its own thread, is the "current" thread the thread the report is running on or is the main application's UI thread?  I don't think I want to set my main application to single thread apartment mode because it is a multi-threaded application (although I really don't know for sure because I am new to multi-threaded programming). 
    My objective is to allow reports to run asynchronously so that the user can do other things while it is being generated.  Here is the code I use to do this:
        ' Previews the report using a new thread (asynchronously)
        Public Sub PreviewReportAsynch(ByVal sourceDatabase As clsMainApplicationDatabase)
            Dim backgroundProcess As System.ComponentModel.BackgroundWorker
            ' Start a new thread to run this report.
            backgroundProcess = New System.ComponentModel.BackgroundWorker
            Using (backgroundProcess)
                ' Wire the function we want to run to the 'do work' event.
                AddHandler backgroundProcess.DoWork, AddressOf PreviewReportAsynch_Start
                ' Kick off the report asynchronously and return control to the calling process
                backgroundProcess.RunWorkerAsync(sourceDatabase)
            End Using
        End Sub
        Private Sub PreviewReportAsynch_Start(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs)
            ' The source database needed to call preview report was passed as the only argument
            Call PreviewReport(CType(e.Argument, clsMainApplicationDatabase))
        End Sub
        ' Previews the report.  From the preview window, the user can print it.
        Public Function PreviewReport(ByVal sourceDatabase As clsMainApplicationDatabase) As FunctionEndedResult
            Dim errorBoxTitle As String
            Dim frmPreview As frmReportPreview
            ' Setup error handling
            errorBoxTitle = "Preview " & Name & " Report"
            PreviewReport = FunctionEndedResult.FAILURE
            On Error GoTo PreviewError
            ' Set up the crxReport object
            If InitializeReportProcess(sourceDatabase) <> FunctionEndedResult.SUCCESS Then
                GoTo PreviewExit
            End If
            ' Use the preview form to preview the report
            frmPreview = New frmReportPreview
            frmPreview.Report = crxReport
            frmPreview.ShowDialog()
            ' Save any settings that should persist from one run to the next
            Call SavePersistentSettings()
            ' If we got this far everything is OK.
            PreviewReport = FunctionEndedResult.SUCCESS
    PreviewExit:
            ' Do any cleanup work
            Call CleanupReportProcess(sourceDatabase)
            Exit Function
    PreviewError:
            ' Report error then exit gracefully
            ErrorBox(errorBoxTitle)
            Resume PreviewExit
        End Function
    The variable crxReport is of type ReportDocument and the windows form called 'frmPreview' has only 1 control, the crystal reports viewer. 
    The print button on the viewer works fine.  Just the export button is failing.  Any ideas?

    Hi Trevor.
    Thank you for the reply.  The report document is create on the main UI thread of my application.  The preview form is created and destroyed on the separate thread.  For reasons I won't get into, restructuring the code to move all the initialization stuff inside the preview form is not an option (OK, if you a really curious, I don't always preview a report, sometimes I print and/or export it directly which means the preview form isn't used).
    What I learned through some other research is that there are some things (like COM calls and evidently some OLE automation stuff) that cannot be run on a thread that uses the MTA threading model.   The export button probably uses some of this technology, thus the message stating that an STA threading model is required.  I restructured the code as follows to accomodate this requirement.  Here is a sample:
    ' Previews the report using a new thread (asynchronously)
        Public Sub PreviewReportAsynch(ByVal sourceDatabase As clsMainApplicationDatabase)
            Dim staThread As System.Threading.Thread
            ' Start the preview report function on a new thread
            staThread = New System.Threading.Thread(AddressOf PreviewReportAsynchStep1)
            staThread.SetApartmentState(System.Threading.ApartmentState.MTA)
            staThread.Start(sourceDatabase)
        End Sub
        Private Sub PreviewReportAsynchStep1(ByVal sourceDatabase As Object)
            Dim staThread As System.Threading.Thread
            ' Initialize report preview.  This includes staging any data and configuring the
            ' crystal report document object for use by the crystal report viewer control.
            If InitializeReportProcess(DirectCast(sourceDatabase, clsMainApplicationDatabase)) = FunctionEndedResult.SUCCESS Then
                ' Show the report to the user.  This must be done on an STA thread so we will
                ' start another of that type.  See description of PreviewReportAsynchStep2()
                staThread = New System.Threading.Thread(AddressOf PreviewReportAsynchStep2)
                staThread.SetApartmentState(System.Threading.ApartmentState.STA)
                staThread.Start(mcrxReport)
                ' Wait for step 2 to finish.  This blocks the current thread, but this thread
                ' isn't the main UI thread and this thread has no UI anymore (the progress
                ' form was closed) so it won't matter that is it blocked.
                staThread.Join()
                ' Save any settings that should persist from one successful run to the next
                Call SavePersistentSettings()
            End If
            ' Release the crystal report
            Call CleanupReportProcess(DirectCast(sourceDatabase, clsMainApplicationDatabase))
        End Sub
        ' The preview form must be launched on a thread that use the single-threaded apartment (STA) model.
        ' Threads use the multi-threaded apartment (MTA) model by default.  This is necessary to make the
        ' export and print buttons on the preview form work.  They do not work when running on a
        ' thread using MTA.
        Public Sub PreviewReportAsynchStep2(ByVal crxInitializedReport As Object)
            Dim frmPreview As frmReportPreview
            ' Use the preview form to preview the report.  The preview form contains the crystal reports viewer control.
            frmPreview = New frmReportPreview
            frmPreview.Report = DirectCast(crxInitializedReport, ReportDocument)
            frmPreview.ShowDialog()
        End Sub
    Thanks for your help!
    Andy

  • How to create a separate account on iTunes for my iPhone and iPad

    I have an 8 GB capacity iPhone which I use to connect to iTune for music, video, app synch purpose. Recently I purchase iPad3 capacity 32 GB.  When I connect pad to iTune first time, pop message says that do u want to create a separate account or restore iPhone backup? That time I had chosen restore.
    Now problem which I am facing is:
    1. Say for example I downloaded 3 HD Gages for iPad then I synced with iTune. Next when I am connecting iPhone these 3 HD games are getting installed on the phone, which I don't want.
    2. Say I have selected almost 20 GB audio and video for my iPad which are there in the iTune, when I am connecting iPhone all these audio and video are started copying to the iPhone.
    How to overcome from this issue. How to create separate account for my iPhone and iPad on iTune? So that same Apps, Music, Video etc. will not installed or copied to both the device when connected to iTunes.
    Help....
    Thanks.

    Have a read here...
    https://discussions.apple.com/message/18409815?ac_cid=ha
    And See Here...
    How to Use Multiple iDevices with One Computer

  • How to create and maintain a backup catalog, separate from default  location,  on and external HD

    How to create and maintain a backup catalog on a separate hd - separate from default location of the catalog?

    Simply copy the LR catalog backup file to another location. It’s quite small and only contains metadata e.g. your edit develop settings, keywords, captions, titles and camera exif data etc.
    The LR backup does not physically copy your image files. So make sure you have a separate system backup for your photo files and folders.

  • How to Create XML Schema From JTree ?

    Please help me... Thank you.
    This is Code
    Tree.java ----- Run This File
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.tree.DefaultMutableTreeNode;
    public class Tree extends JPanel implements ActionListener {
        private int newNodeSuffix = 1;
        private static String ADD_COMMAND = "add";
        private static String REMOVE_COMMAND = "remove";
        private static String CLEAR_COMMAND = "clear";
        private static String OK_COMMAND = "ok";
        private DynamicTree treePanel;
        public Tree() {
            super(new BorderLayout());
            //Create the components.
            treePanel = new DynamicTree();
            //populateTree(treePanel);
            JButton addButton = new JButton("Add");
            addButton.setActionCommand(ADD_COMMAND);
            addButton.addActionListener(this);
            JButton removeButton = new JButton("Remove");
            removeButton.setActionCommand(REMOVE_COMMAND);
            removeButton.addActionListener(this);
            JButton clearButton = new JButton("Clear");
            clearButton.setActionCommand(CLEAR_COMMAND);
            clearButton.addActionListener(this);
            JButton okButton = new JButton("OK");
            okButton.setActionCommand(OK_COMMAND);
            okButton.addActionListener(this);
            //Lay everything out.
            treePanel.setPreferredSize(new Dimension(300, 150));
            add(treePanel, BorderLayout.CENTER);
            JPanel panel = new JPanel(new GridLayout(0,1));
            panel.add(addButton);
            panel.add(removeButton);
            panel.add(clearButton);
            panel.add(okButton);
            add(panel, BorderLayout.LINE_END);
        /*public void populateTree(DynamicTree treePanel) {
            String p1Name = new String("Parent 1");
            //String p2Name = new String("Parent 2");
            String c1Name = new String("Child 1");
            //String c2Name = new String("Child 2");
            DefaultMutableTreeNode p1;
            p1 = treePanel.addObject(null, p1Name);
            //p2 = treePanel.addObject(null, p2Name);
            treePanel.addObject(p1, c1Name);
            //treePanel.addObject(p1, c2Name);
            //treePanel.addObject(p2, c1Name);
            //treePanel.addObject(p2, c2Name);
        public void actionPerformed(ActionEvent e) {
            String command = e.getActionCommand();
            if (ADD_COMMAND.equals(command)) {
                //Add button clicked.
                treePanel.addObject("New Node " + newNodeSuffix++);
            } else if (REMOVE_COMMAND.equals(command)) {
                //Remove button clicked.
                treePanel.removeCurrentNode();
            } else if (CLEAR_COMMAND.equals(command)) {
                //Clear button clicked.
                treePanel.clear();
            } else if (OK_COMMAND.equals(command)) {
                 //Ok button clicked.
                 treePanel.ok();
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
        private static void createAndShowGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("Craete XML Tree");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            Tree newContentPane = new Tree();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }DynamicTree.java
    import javax.swing.JOptionPane;
    import java.awt.GridLayout;
    import java.awt.Toolkit;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.MutableTreeNode;
    import javax.swing.tree.TreePath;
    import javax.swing.tree.TreeSelectionModel;
    import javax.swing.event.TreeModelEvent;
    import javax.swing.event.TreeModelListener;
    public class DynamicTree extends JPanel {
        protected DefaultMutableTreeNode rootNode;
        protected DefaultTreeModel treeModel;
        protected JTree tree;
        private Toolkit toolkit = Toolkit.getDefaultToolkit();
        public DynamicTree() {
            super(new GridLayout(1,0));
            rootNode = new DefaultMutableTreeNode("Root Node");
            treeModel = new DefaultTreeModel(rootNode);
            treeModel.addTreeModelListener(new MyTreeModelListener());
            tree = new JTree(treeModel);
            tree.setEditable(true);
            tree.getSelectionModel().setSelectionMode
                    (TreeSelectionModel.SINGLE_TREE_SELECTION);
            tree.setShowsRootHandles(true);
            JScrollPane scrollPane = new JScrollPane(tree);
            add(scrollPane);
        /** Remove all nodes except the root node. */
        public void clear() {
            rootNode.removeAllChildren();
            treeModel.reload();
        public void ok() {
             int n = JOptionPane.showConfirmDialog(null, "Do you want to create XML Schema?", "", JOptionPane.YES_NO_OPTION);
        /** Remove the currently selected node. */
        public void removeCurrentNode() {
            TreePath currentSelection = tree.getSelectionPath();
            if (currentSelection != null) {
                DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode)
                             (currentSelection.getLastPathComponent());
                MutableTreeNode parent = (MutableTreeNode)(currentNode.getParent());
                if (parent != null) {
                    treeModel.removeNodeFromParent(currentNode);
                    return;
            // Either there was no selection, or the root was selected.
            toolkit.beep();
        /** Add child to the currently selected node. */
        public DefaultMutableTreeNode addObject(Object child) {
            DefaultMutableTreeNode parentNode = null;
            TreePath parentPath = tree.getSelectionPath();
            if (parentPath == null) {
                parentNode = rootNode;
            } else {
                parentNode = (DefaultMutableTreeNode)
                             (parentPath.getLastPathComponent());
            return addObject(parentNode, child, true);
        public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
                                                Object child) {
            return addObject(parent, child, false);
        public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
                                                Object child,
                                                boolean shouldBeVisible) {
            DefaultMutableTreeNode childNode =
                    new DefaultMutableTreeNode(child);
            if (parent == null) {
                parent = rootNode;
            treeModel.insertNodeInto(childNode, parent,
                                     parent.getChildCount());
            //Make sure the user can see the lovely new node.
            if (shouldBeVisible) {
                tree.scrollPathToVisible(new TreePath(childNode.getPath()));
            return childNode;
        class MyTreeModelListener implements TreeModelListener {
            public void treeNodesChanged(TreeModelEvent e) {
                DefaultMutableTreeNode node;
                node = (DefaultMutableTreeNode)
                         (e.getTreePath().getLastPathComponent());
                 * If the event lists children, then the changed
                 * node is the child of the node we've already
                 * gotten.  Otherwise, the changed node and the
                 * specified node are the same.
                try {
                    int index = e.getChildIndices()[0];
                    node = (DefaultMutableTreeNode)
                           (node.getChildAt(index));
                } catch (NullPointerException exc) {}
                System.out.println("The user has finished editing the node.");
                System.out.println("New value: " + node.getUserObject());
            public void treeNodesInserted(TreeModelEvent e) {
            public void treeNodesRemoved(TreeModelEvent e) {
            public void treeStructureChanged(TreeModelEvent e) {
    }

    XML shema is basically an XML file. So u need to know how to create an XML,
    provided u know how the shema file should be.
    Creating an XML :
    http://forum.java.sun.com/thread.jspa?threadID=5181031&messageID=9705786#9705786

  • How to create 2 separate libraries on one computer ?

    I have two music folders (such as "kids" and "Adults") in the "My Music" folder and I want to create 2 separate libraries for managing the music for Kids versus adults.  I cannot figure out how to create a new iTunes library limited to a single folder tree ("kids" for example) . . .  because iTunes only gives the option to "Scan for Media" which is promiscuous and scans everything, regardless of where the library files are created.
    I know I can temporariry remove the "kids" folder then create a the "Adult" library.  Then temporariliy remove "Adults" folder and create a "Kids" library, but thats requires hours of file copying to and from an External USB drive.  Once the two libraries are created then they can live together on the same computer . . . but how to get the libraries initially created is the question ?    Maybe I will try NTFS file permissions to make folder 'A' invisible to iTunes while creating the library for folder 'B'.
    But there must be an iTunes option to do this . . right ?

    RESOLVED . . . Still looking for an iTunes method of creating 2 libraries on 1 computer.   But if it helps for others, you can use NTFS file permissions to deny access to one folder tree to keep iTunes focused on the other folder tree it can see when you select "Scan for Media".
    Then reverse the permissions to create the library for the other folder tree.   When done allow access two both trees and they will then co-exist on one computer. 
    The only remaining inconvenience . . . I have iTunes Match set up on library "Adults".  If I sign into the Apple store to buy a song or get artwork from library "Kids", iTunes is populated with the "Adult" songs from iTunes Match.  I just have to avoid staying signed into the Store from the "Kids" library, so someone doesn't start downloading "Adults" music into the "Kids" library.
    To inform the context of this question, we have 3 Apple portable devices that play from our iTunes Match "adult" library.  We also have "Adult" and "kid" devices that are not Apple, so we just copy the respective folder tree to non-Apple devices.
    So the use NTFS DENY permissions works for creating two libraries on a single computer, and it only take a few minutes to do,  BUT FOR THOSE WHO AREN'T SYSTEM ADMININSTRATORS, IS THERE AN "APPLE WAY" TO DO THIS ON A WINDOWS COMPUTER?

  • How to create separate log files for each deployed web application in oc4j

    Hi All,
    I am using Windows2000, Oracle9iAS(OC4J). Say I have deployed 3 web applications onto this oc4j server. Then how to create 3 different log files so that I can see the log messages(System.out.println's) of each of these web appliations in a different log file.
    Thanks and Regards,
    Ravi.

    Where do the messages printed via ServletContext.log() go? Is this configurable separately by web application? If so, you could at least replace your System.out.println() with sc.log() statements. For exceptions, you could trap them and log them since the log() method takes a throwable as well as a String.
    John H.

  • How to create JTree without root node

    Hello;
    I like to create a JTree without root node?
    Any help?
    Thanks!
    --tony                                                                                                                                                                                   

    javadocs JTree,
    setRootVisible
    public void setRootVisible(boolean rootVisible)
    Determines whether or not the root node from the TreeModel is visible.
    Parameters:
    rootVisible - true if the root node of the tree is to be displayedSee Also:
    rootVisible

  • How to create a control to work with a select function to display two separate texts.

    I'm currently taking a Labview course at my college and for a starting project we need to create a problem to convert x amount in USD to either Yen or Euro using a toggle switch and a select boolean function. I need to know how to display a text label for the Yen value and for the Euro value being displayed in the same numeric indicator when selected. Basically I have the program working I just need to know how to create a control that will show Yen next to the value when it calculates for Yen and likewise for Euro   

    Richx9252,
    As Ravens Fan said you can either use a string indicator next to the numeric indicator to display the currency type or use a property node to edit the label of the numeric control to display the current currency type.  Please let us know if you have more questions about how this will work.
    Regards,
    Sam K
    Applications Engineer
    National Instruments

Maybe you are looking for

  • Cs6 wont open

    I downloaded CS6 from a CD. After installing I went to open it and the only Photoshop on my computer is CS4 and an error message appears saying "that adobe Photoshop has stopped working". I am very confused and would like some assistance please.

  • Front row won't play any theme except the classic one

    Hey guys I cannot get front row to play any other theme except the classic (ken burns) theme I've tried setting a theme as default in iphoto and i've made a slideshow, but nothing worked Any ideas? Thanks Chris

  • Frozen and lost photo's!?!?

    i just imported 200 so photo's into iPhoto but after the import i was rotating some and the program crashed, when i re-opened it the photo's i just imported were not there. As usual i had selected the option to delete the photo's from my camera after

  • Java error - Oracle Security Alert for CVE-2010-4476

    I have come across this security alert described at http://www.oracle.com/technetwork/topics/security/alert-cve-2010-4476-305811.htm l In summary - Java Runtime Environment hangs when converting "2.2250738585072012e-308" to a binary floating-point nu

  • Convert 32 bit EXR to 16 bit.

    Is there a way in Javascript to read the .exr format (32 bit) then convert to 16 bit? I'm rather new at this, so many thanks for your help.