Jtree - beginner question

hi,
i wanted to build a jtree and have started the swing tutorial on it, seems small, but i wanted to know is it easy to build a jtree to map the file system? something like windows explorer? i wanted to build a ftp utility and wanted to show the local and remote drives and file systems in a scroll pane, so i was thinking about using a jtree, first time i've had to use it, so i'm a little new to it.
Thank you.

Search Google for "java file explorer"
--A                                                                                                                                                                                                                       

Similar Messages

  • Beginner Question

    Hello all, hopefully I have posted this to the correct LiveCycle board!
    I'm new to Acrobat and LiveCycle in general. I'm working out of windows LiveCycle Designer 8.x  and my question is as follows....
    I'm working off of the "Quote" Form Template and what I am looking for is a way to make the rows of the Table expand as needed.  I will be converting this Template into a "Purchase Order" form, and there will be many occassions where I will need to increase the table rows - perhaps onto a second or even third page - due to the volume of different items I will be seeking prices on at a given time.
    Long story short I would like to take this "QUOTE" form template and make it such that if needed, I can expand the table size one row at a time, pushing the content beneath (Comments, subtotal, etc) onto the next page....
    Hoping I have explained my query well enough,  Could anyone provide me a solution or point me in the correct direction?
    Many thanks!

    As a followup, so as not to clog the board with numerous threads I have another beginner question
    For the sake of hypotheticals I am creating a dynamic PDF form.  This pdf is a Purchase Order Form, with a table in the Body that will expand/contract as the form user needs.  (EXA-  Default table size is 5 items, however user is creating an order for 12 items, he/she can increase the table rows to desired capactiy.) It will be a very simple layout. All data for the form will come from manual entry, no XML data binding going on.
    My new question is as follows:    Is there a way I can have this user's Adobe reader or Adobe acrobat software remember previous data entries, so that if 4 weeks after ordering widget X he/she needs to place another order for widget X, the software will autofill the table as he/she types into the table cell?
    This would be similar to how Excel will start to autofill if it recognizes a previously entered value from some other cell in the worksheet (workbook?)
    EXA-
    [NAME]   [MODEL]   [QTY]   [PRICE]
    Widget           A            433        $30.00
    Would it be possible for the software to notice that I'm typing the word "widget" somewhere after typing "wid" ???
    Many thanks for any and all followups, I'm a teenager trying to help out in my father's small business. They are in the darkages here and I'm doing my best to self teach.
    Thanks.

  • Beginner question: Can I apply one formula to all cells in a column?

    Hi,
    I'm new to spreadsheets, so apologies for asking what is probably a very simple question.
    I want to apply a formula that divides the values in one column (W) by values in another (AX) for a table containing 3000 rows, and outputs the result for each row into the appropriate cell in the new column I've created.
    Numbers 09 'help' hasn't helped to this point.
    Thanks in advance for any assistance.

    GeoBrett wrote:
    Numbers 09 'help' hasn't helped to this point.
    Besides Numbers '09 Help there are two other useful resources available in the Help menu: the Numbers '09 User Guide and iWork Formulas and Functions Help.
    For "Beginner questions," my first choice would be the User Guide. For the specific question you asked, a quick scan of the chapter on "Using Formulas and Functions" (pp 83-96) will provide some useful information. Start in the neighborhood of page 93.
    Regards,
    Barry

  • Beginner question regarding 32-bit mixing and mixdown workflow

    Hello
    I have a beginner question regarding 32-bit mixing and mixdown.
    If I edit some 16Bit, 44.1kHz Stereo WAV Files and put them into multi-track view to do crossfades, how should I do the mixdown?
    Audition shows me in multi-track view, that it is doing 32-Bit mixing.
    Can I just mixdown to 16Bit, 44.1kHz Stereo without any dithering (as the files are 16Bit, 44.1kHz Stereo to begin with), or will I lose quality that way?
    I will be performing a normalization to 96% to the mixdown and then split to tracks in Audition, as in the end I want to to have an audio CD.
    I guess I could mixdown to 32Bit, then normalize and in the end save back to 16Bit, 44.1kHz Stereo WAV (with dithering, I suppose?), but I want to avoid any unnecessary converting steps.
    Greetings

    Any time you do any processing on a 16bit file in 16 bit only it will degrade the audio slightly due to rounding of the calculations. Working in 32 bit floating point (Audition's default) takes account of all bits generated due to processing.
    So it is always best to work in 32 bit, even if your originals were 16, all the way through until the last stage of saving the files for CD burning. Any losses due to conversion will be insignificant against those due to working 16 bit.

  • Beginner question - how to efficiently check if a photo is part of the selection

    Dear all,
    Sorry for this beginner question, however I don't know how to solve it and I'm sure that there is a quick and easy answer to this:
    My target is to get all the "heads of stack" (photos with Position 1 in stacks) of the selection ("photos" below).
    for i, photo in ipairs( photos ) do
      local photoName = photo:getFormattedMetadata('fileName')
       if photo:getRawMetadata( 'isInStackInFolder' ) then
       --Photo is in a stack
            local photoHeadOfStack = photo:getRawMetadata('topOfStackInFolderContainingPhoto')
            local stackPos = photo:getRawMetadata( 'stackPositionInFolder' ) -- get the position in the stack
            local photoHeadName = photoHeadOfStack:getFormattedMetadata('fileName')
            app:logVerbose("Photo nb ^1, name ^2 is in a stack with the position ^3", i, photoName, stackPos)
            if stackPos == 1 then
            -- photo is master of the stack
                 stackTop[#stackTop+1]=photo
                 app:logVerbose("Photo ^1 is top of the stack ^2", photoName, #stackTop)
                 -- check if couple if correct
            elseif photos.photoHeadOfStack then
                 app:logVerbose("Photo ^1 is in a stack, but not on top. Top of the stack already selected", photoName)
            else
                 stackTop[#stackTop+1]=photoHeadOfStack
                 app:logVerbose("Photo ^1 is in a stack, but not on top. Top of the stack ^2 - ^3 ", photoName, #stackTop, photoHeadName)
            end
      end
    end
    In the if structure in the middle checking the Position in the stack, if the Position is not 1, I would like to check if the photo heading the stack ('photoHeadOfStack') is part of 'photos'. I tried 'elseif photos.photoHeadOfStack then' and 'elseif photos[photoHeadOfStack] then' but it doesn't work ->this elseif is never true even if 'photoHeadOfStack' is part of 'photos'.
    Is there anyway to have this check done without checking "manually" photos ?(via for example a for Loop)
    I'm sure that Lua proposes this, but I don't know how...
    I thank you for your Support!

        --[[ This code creates "stackTops", an array of LrPhotos that are the
        tops of all the stacks containing photos in the array
        "photos". ]]
    stackTopSet = {}
    for _, photo in ipairs (photos) do
        local stackTop = photo:getRawMetadata ("topOfStackInFolderContainingPhoto")
        if stackTop ~= nil then stackTopSet [stackTop] = true end
        end
    stackTops = {}
    for photo, _ in pairs (stackTopSet) do table.insert (stackTops, photo) end

  • Beginner Question: SA520 Admin access through WAN port

    Dear all,
    I've a beginner question regarding my brand new SA520: How can I configure the box so that I'm able to access the admin GUI not only through the LAN ports but also from the WAN ports?
    I tried already to allow inbound traffic to the firewall's internal IP address (not sure if done right, so) and granted the admin user access profile from WAN and LAN: I can access the box from the LAN but not from the WAN. Any ideas?
    Thanks,
    Eric
    PS: Yupp, I know that it's not a good idea to expose a FW admin GUI to the WAN - but this is only a lab environment

    Go to Administration -> Users.
    click on the 'Edit User Policies' 'Login' button.  It's there you can enable WAN access.

  • Beginner question - using pre for flexibility in text?

    Hi,
    Apologies for the beginner question, but I am struggling to work out whether it is more sensible to use <pre> in all my texts, as it seems more flexible.
    It seems that when I use <p> - paragraph - I can't use multiple space bars to align certain bits of text, but more disruptively I have gaps between text when I press Enter (I guess this defines the paragraph, but isn't always wanted).
    Well, basically, <pre> seems more flexible, but it behaves strangely sometimes. What do other people use?
    Many thanks!
    Ivan Reshetilov
    http://www.ivanreshetilov.co.uk

    Hi Ireshe, just a beginner like you.  Have never heard of <pre> tags, use <p> tags.  If you hit SHIFT enter after a sentence this puts in a <br> tag or line break which basically leaves a blank line between text.
    If you add     &nsbp;    or lots of them between words this gives you an extra space between letters.  How all your paragraphs sit on the page is defined by CSS.  E.g.
    p {
         margin:0;
         padding: 5px 0 0 10px;}
    This would place all text within <p> tags on your page, with a 5px gap at the top, no space to the right or bottom and 10px space to the left.  Hope this helps, good luck!
    Amanda
    www.kimberleywebdesign.com.au

  • Beginner question: Configure Tomcat for JAAS?

    Hi,
    This is a beginner question :-(. I'm trying to get JAAS to work on my Tomcat (6.0.12) installation. I used code from a Javaworld article (http://www.javaworld.com/javaworld/jw-09-2002/jw-0913-jaas.html)
    Of course I had to configure my Tomcat to work together with JAAS. The document I used is: http://tomcat.apache.org/tomcat-6.0-doc/printer/realm-howto.html
    According to the Tomcat doc I have to do the following steps before I can use JAAS to authenticate a user:
    1. Develop your code. Place the compiled classes in Tomcat's classpath
    2. Setup a login.config file for Java, and tell Tomcat where to find it (set JAVA_OPTS)
    3. Configure the JAASRealm in your server.xml
    1 Develop code: I use the following classes:
    PassiveCallbackHandler.java
    RdbmsCredential.java
    RdbmsLoginModule.java
    RdbmsPrincipal.java
    These classes I put in the package rdbmsjaas.
    In the %CATALINA_HOME%/webapps/Javaworld_Jaas/WEB-INF/lib directory I created the rdbmsjaas.jar file.
    The jsp is called jaas.jsp, and is stored in %CATALINA_HOME%/webapps/Javaworld_Jaas
    2. Setup login.config
    In %CATALINA_HOME%\conf I saved the file Javaworld_all_that_Jaas.config, containing:
    Example {
       RdbmsLoginModule required
       debug="true"
       url="jdbc:mysql://localhost/jaasdb?user=javauser&password=javadude"
       driver="com.mysql.jdbc.Driver";
    };I created an XP Environment Variable JAVA_OPTS with the value <-DJAVA_OPTS=-Djava.security.auth.login.config==C:/Program Files/Apache Software Foundation/Tomcat 6.0/conf/JavaWorld_All_That_Jaas.config> (excluding < and >)
    I used the fully qualified address, instead of $CATALINA_HOME/conf/JavaWorld_All_That_Jaas.config. I think XP balks when it sees $CATALINA_HOME).
    3 Configure JAASRealm in server.xml
    In %CATALINA_HOME%\conf\ I changed web.xml. I added the following lines:
          <Realm className="org.apache.catalina.realm.JAASRealm"
                 appName="jaas"
                 userClassName="rdbmsjaas.RdbmsPrincipal"
                 debug="99"
           />If I run the jsp from http://localhost:8080/JavaWorld_Jaas/jaas.jsp, I can enter my username/password, but when I click the Submit button, I get:
    Caught Exception: java.lang.SecurityException: Unable to locate a login configurationWhere did my configuration go wrong?
    Abel

    You will need a JSP/servlet engine such as Tomcat - Apache alone won't do it.
    I haven't seen any tutorials on set-up but the Tomcat documentation includes info on how to link to Apache. There are also books you can buy - check out the online book stores such as Amazon.
    There's also a lot of info on this forum.

  • Beginner question: creating my own virtual instruments from samples

    Hi, I have a beginner question. I'd like to make a click-track, but I want to use my own sounds, either recorded or from the internet. Can I do this with Logic Express 7, or do I need Logic Pro 7 and the EXS24?
    Thanks,
    Ryan

    I think you can do it, but it might be a pain.
    You could import a sample of a single click and just paste it into every beat on the Arrange Page.
    Other than that, you might need the sampler included with Logic Pro

  • Beginner Question JTREE

    I am new to JTREE. i found an example in the net, and shows an easy way to code a JTREE. but the content of this JTREE is a constant. i cant change the values of its content. i think its a default set of data that has got saved (Colours, sports, food ).
    My task is to retrieve from a Database and construct the JTree (i mean its content, like root and leaf nodes), with the data we retrieved from the Database. Can some one please tell me how to modify this content to achieve that ?
    import java.awt.BorderLayout;
    import java.awt.Container;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    public class TreeSample {
      public static void main(String args[]) {
        JFrame f = new JFrame("JTree Sample");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = f.getContentPane();
        JTree tree = new JTree();
        JScrollPane scrollPane = new JScrollPane(tree);
        content.add(scrollPane, BorderLayout.CENTER);
        f.setSize(300, 200);
        f.setVisible(true);
    }This is my code, and for example can some one show me how to add other strings to this JTREE ??? plzz help me. i am an absolute beginner..

    I recommend you learn [ How to Use Trees|http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html] first, then worry about the rest of it.
    PS- It's JTree, not JTREE, and "plzz" is not an English word.

  • JTree sizing question...

    Hello:
    I have a JTree for which each cell contains a button. I have written a renderer that renders the button, and I realize that I have to do some special stuff to capture a click on the button. My question is unrelated to all of that.
    The problem is that over time, the labels on my buttons change (and may become longer (wider)), but the tree size does not change. In fact, when I update the button label and the tree is re-rendered the rendering of the button gets "chopped off". I've put the tree in a scroll pane, but this doesn't help - the right side of some of the buttons get cut off to the original tree size. I've tried lots of different variations on setPreferredSize, calling repaint, etc, and am not having any luck. I've put together a demonstration of this behavior in a smallish application that I'm posting here, where I create a 2 node tree with buttons that read "Hi", then I change the button labels to "Goodbye" and re-render. You'll see that the button's are cut off about halfway through the button.
    In case its important - I'm running java version 1.5.0_07 on a 32-bit Linux box.
    Any help would be greatly appreciated. Thanks in advance!
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.*;
    public class JTreeQuestion
      public static void main(String [] args)
        JTreeFrame f = new JTreeFrame();
        f.pack();
        f.setLocation(30, 30);
        //Draws buttons with "Hi" (short string)
        f.setVisible(true);
        ButtonNode.updateString("Goodbye");
        //Draws buttons with longer string, buttons get "cut off"
        f.repaint();
    class JTreeFrame extends JFrame
      JTree tree;
      JScrollPane treeView;
      public JTreeFrame()
        super("My Tree");
        DefaultMutableTreeNode root;
        root = new DefaultMutableTreeNode(new ButtonNode());
        root.add(new DefaultMutableTreeNode(new ButtonNode()));
        tree = new JTree(root);
        tree.setCellRenderer(new ButtonNodeRenderer());
        treeView = new JScrollPane(tree);
        add(treeView);
    class ButtonNode
      public static String str = "Hi";
      public static void updateString(String inStr)
      { str = inStr; }
      String getStr()
      { return str; }
    class ButtonNodeRenderer extends DefaultTreeCellRenderer
      public Component getTreeCellRendererComponent(JTree tree,
                              Object value, boolean sel, boolean expanded,
                              boolean leaf, int row, boolean hasFocus)
        Box theBox = new Box(BoxLayout.X_AXIS);
        super.getTreeCellRendererComponent(tree, value, sel, expanded,
                                           leaf, row, hasFocus);
        DefaultMutableTreeNode jtreeNode = (DefaultMutableTreeNode)value;
        theBox.add(new JButton(((ButtonNode)jtreeNode.getUserObject()).getStr()));
        return (theBox);
    }

    For those who are interested. The DefaultTreeModel has a method named nodeChanged() that tells the tree model that a specific node has changed, and the model re-interprets the cell causing its sizse to change as necessary, so that the full button is rendered now.
    Basically what I did was instead of calling repain, I call a method that I wrote that loops through all the tree nodes, indicates they have changed, then repaint's, and it all works out. My trees are relatively small, so this is fine, but if others face the same problem, you'll probably want to selectively indicate which nodes have changed so the tree model doesn't have to do more work than necessary.

  • JTree image question

    I have a question about using images in a JTree.
    I have like 2 parent nodes who both have a lot of child nodes now i know how to get an image for every node but how do i get 1 image for 1 parent with all his children and another image for the other parent with his children.

    It is a programming problem because i dont know how to give echt DefaultMutableTreeNode his own picture. You should think of it like msn when you log in your contacts are in a Tree and your offline contacts have a red icon and online contacts have green one. I need to to the same for my program(chat program). But i can't figure out how but i know how to give alle the DefaultMutableTreeNode's a picture but i cant give individual one's a picture.
    I hope i cleared things up :)

  • JTree#expandRow() Question

    JTree tree;
    //etc...
    1) /** Expand the tree */
    for (int i=0; i<tree.getRowCount(); i++)
         tree.expandRow(i);
    and tree.getRowCount() = 6
    2) /** Expand the tree */
    for (int i=0; i<6; i++)
         tree.expandRow(i);
    My tree has 6 rows, and each row has its own sub-tree hierarchy.
    I wonder why the first case will expand the whole tree, which includes
    the subtrees of each row.
    But in second case, it only expands the first 6 rows in the tree.
    So basically the question is why (1) and (2) have different tree view outputs??

    Well, after you expand row 1, the row count isn't 6 anymore, is it? It's something larger than that, depending on how many children the first node has.

  • JTree Updating question

    Hi there. I have two questions.
    I have a data structure that is being displayed in a JTree, so I made a Model and it works great. The data structure can be updated from non-gui interaction. The nodes don't change position or anything, its just the data that is displayed is changed. I handle it currently by calling a function in the model I made called nodesChanged(), which basically does the following:
    public void nodesChanged()
        int len = treeModelListeners.size();
        TreeModelEvent e = new TreeModelEvent(this, new Object[] {rootItem});
        for (int i = 0; i < len; i++) {
          ( (TreeModelListener) treeModelListeners.elementAt(i)).treeNodesChanged(e);
      }It does actually work, the changes are reflected in the JTree, but it seems a little expensive, and the updates to the actual data model could come at about 150 per second. To deal with that now, I just use a timer class that updates it about every 3/10's of a second, which does a pretty good job, but is there a more elegant way to do this? Something where the node is an observer of the data in the data structure (which are Observable objects)?
    The second question I have is when I do the above, sometimes the display name of the node will be larger than the value it had previously, but the Textbox (if that's what it is) doesn't grow, so I get a ... at the end.
    For example, if I have "Run" and it changes to "Stopped", it will show up as "Sto...".
    Any help would be great. TIA.

    well, you can start by making the node you put in the tree model event the lowest node in the tree that needs updating, instead of root.
    I don't know about the timer thing, cuz as far as I know, the listener will invoke code that will refresh the renderers, as opposed to painting where repaint calls can be merged into one. If you aren't getting that many updates all the time, you could implement something where the listener fires to an intermediate listener which will fire the info to the tree after a slight delay. That way if you get multiple updates, you can effectively ignore lots of them.
    The ... thing, I thought that treeNodesChanged was the appropriate method, although maybe it has to be for the specific node, not root.

  • Beginner question about granting access rights

    Hi, am a total beginner, just a very simple question. I have created a number of tables with my admin account that I would like user accounts to be able to see (they should only be allowed to see these few tables)
    I then created a user account called EDWARD with just the basic connect access right (I don't want them to be able to create/delete tables etc, just to be able to query the tables I have created above and to add rows to these tables)
    Google searching has lead me to the grant statement, so I tried this from the admin account:
    grant select, update, insert on CUSTOMERS to EDWARD;
    This statement executes correctly but when I log in the EDWARD account I cannot do any of these things, instead I get the error: ORA-00942: table or view does not exist
    Any ideas?
    Thanks

    >>Would it be better to create a separate account called 'ADMIN' perhaps that I use for
    my application admin and then grant them appropriate access to confidential tables
    rather than logging them in as the SYSTEM?
    Yes, this is what I would advise, since SYSTEM (like SYS and several others...) is not user like other, it's better do not work and create object under this one. Keep it for Oracle administration usage only, not for application administration, create your own schema for this.
    Nicolas.

Maybe you are looking for

  • Explain Plan in DB control

    Hi, on 10.2.0.4, is it possible to generate an explain plan ifrom DB control (or isqlplus ) ? If yes how ? Thank you.

  • Nokia 5320 - Gallery stuck on "Opening"

    Since yesterday the phone keeps getting stuck on "Opening" when I get in any of the galleries (Photos, Videos, Animations, etc.), and when I try to access any of the multimedia content via /Config/General/Personalization, and stuff like that. The onl

  • Import Closed Sales Orders using DTW

    I need to import closed Sales Orders so that my client will have Sales history reporting.  DTW does not display DocStatus or LineStatus in the import mapping screen.  Is DTW the correct tool to use or is there a utility to close a range of Sales Orde

  • ME9F generates authorisation High level risks, why?

    Hi All! Please, advise why transaction ME9F - Message Output: Purchase Orders generates High level risks with such transactions as MK01     Create vendor (Purchasing) MK02     Change vendor (Purchasing) XK02     Change vendor (centrally) MIGO     Goo

  • Firewalls and WLE

    IHAC who is using WLE5.1, wants to get some recommendations on the number of ports they need to reserve for a firewall which essentially sits in between their WLE clients and servers. Keeping in mind that once the client requests comes into a WLE dom