Simple Question... but urgent

I have a JTree and a TreePath.
How can I retrieve the DefaultMutableNode corresponding to this TreePath in my Jtree ?
this must be easy but I can not find out how.
please help.
Sylvain.

treepath.getLastPathComponent() gives u a object, type cast it to DefaultMutableTreeNode

Similar Messages

  • Simple question but urgent help needed....

    I am using Sqlplus i need help on one query. I have got table with 34,000 rows and i would like to findout the frequency frm that table...can anyone help me plz how shud i do it?
    I have all this field in my table ( PROD_ID CUST_ID TIME_ID PROMO_ID QUANTITY_SOLD AMOUNT_SOLD)
    I need to find out the frequency for quantity sold column can some1 help me plz.
    Message was edited by:
    user562879

    SQL> create view v as select column_value as item from table(integer_tt(17, 17, 14, 16, 15, 24, 12, 20, 17, 17, 13, 21, 15, 14, 14, 20, 21, 9, 15, 22, 19, 27, 19));
    View created.
    SQL> select * from v;
          ITEM
            17
            17
            14
            16
            15
            24
            12
            20
            17
            17
            13
            21
            15
            14
            14
            20
            21
             9
            15
            22
            19
            27
            19
    23 rows selected.
    SQL> @count item v
          ITEM      TOTAL    %
             9          1    4
            12          1    4
            13          1    4
            14          3   13
            15          3   13
            16          1    4
            17          4   17
            19          2    9
            20          2    9
            21          2    9
            22          1    4
            24          1    4
            27          1    4
    13 rows selected.
    SQL> @cardinality item v
    Occurrences Groups with this cardinality   Total rows Proportion
               1                            7            7         30
               2                            3            6         26
               3                            2            6         26
               4                            1            4         17
                                                        23        100
    4 rows selected.

  • How do I select a square brush for the brush tool in CS6?  Sorry if this is a simple question, but nothing has ever been simple for me in Photoshop.

    How do I select a square brush for the brush tool in CS6?  Sorry if this is a simple question, but nothing has ever been simple for me in Photoshop.

    I don't believe there is a square brush among the sets that ship with Photoshop, but there are plenty to download, and it is super easy to make one.
    Just drag with the rectangular Marquee tool, fill with black on a new layer, and go Edit > Define brush preset
    Browsing Photoshop Brushes on DeviantArt

  • This is a very simple question,but I don't know.Please me.Thank you!

    I am a Chinese student in a university.I have a very simple question to ask.
    I have writed a EJB module,and I have deployed to Weblogic8.1 successfully.
    1.Now I want to write a client program.Is it necessary that the client program is packaged in the EJB package.For example ,the EJB package is Beans,is "package Beans " or "import Beans.*" necessary in my client program.
    2.If I only know the EJB interfaces,that means the EJB module is writed by other programer.I want to know how I can write the client program.How can I call EJB module's method writed by other programer.Could you give me a simple example?
    Thank you very much.

    I have writed a EJB module,and I have deployed to
    Weblogic8.1 successfully.:-)
    1.Now I want to write a client program.Is it
    necessary that the client program is packaged in the
    EJB package.For example ,the EJB package is Beans,is
    "package Beans " or "import Beans.*" necessary in my
    client program.You need not package your client with the EJB. It can be a JSP/servlet or a stand-alone application.
    2.If I only know the EJB interfaces,that means the
    EJB module is writed by other programer.I want to
    know how I can write the client program.How can I
    call EJB module's method writed by other
    programer.Could you give me a simple example?
    import java.util.*;
    import javax.naming.*;
    import javax.rmi.PortableRemoteObject;
    import examples.*;
    class TestEJBHello {
        public static void main(String[] args) {
            Context context   = null;
            Object object     = null;
            // Hashtable for environment properties.
            Hashtable env = new Hashtable();
            env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
            env.put(Context.PROVIDER_URL, "t3://localhost:7001");
            HelloHome home            = null;
            HelloWorld hello          = null;
            try {
                context     = new InitialContext(env);
                object      = context.lookup("HelloWorldTest");
                System.out.println(" JNDI Looked up >>> " +object);
                home        = (HelloHome)PortableRemoteObject.narrow(object, HelloHome.class);
                hello       = home.create();
                System.out.println(hello.hello());
            } catch(Exception e) {
                e.printStackTrace();
            } finally {
                close(context);        // Closes the initial context.
        private static void close(Context context) {
            try {
                context.close();
                System.out.println("*** Context closed. ***");
            } catch (NamingException namingException) {
                namingException.printStackTrace();
            } catch(Exception exception) {
                exception.printStackTrace();
    }Here's a sample client app code I use for a HelloWorld EJB. You need to have a EJB client JAR containing the home and remote interfaces in the classpath during compile time and runtime.
    x

  • Simple Question Please URGENT

    Hello All,
    I'm having a little problem in witting an SQL statement.
    I'm sure there is a simple solution for it but its just not clicking with me!.
    Anywayz,
    I'm trying to write a statement that in the FROM clause, there is a formula, and i would like to assign conditions to this formula in the WHERE Clause
    Ex:
    SELECT DateValue(FLD_AS_STRING) FROM Table1 WHERE ???
    I want the statement to convert the FLD_AS_STRING field (which is in string format) to Date format, and in the same time i want to only view fields that it's FLD_AS_STRING is greater than today's date (after it is converted to Date)?
    How can i do that in this statement?
    Thanks in advance,
    Best Regards

    who do you mean "we"?Forum members that are quite fed up with people declaring their matters (more) urgent then other people's questions. I'm also one of them.
    I just wanted to grab people's attention for helpA simple thread with an appropriate subject line that describes the problem in short and a message that includes enough information to develop a solution for said problem would suffice.
    in the same time, it IS urgent, because my work is
    based on the solution for this issue...So what about everybody's else work? Not as important as your task?
    BTW, i dont see how rude that could be, could you plz
    explain!?Just imagine if everyone that wants to grab attention in this forums uses urgent in the subject line. Do you really consider that the way to go?
    C.

  • Very simple question - but cant find anything to do this! (other than a full proxy server)

    Simple one for everyone who has kids... I run a wrt54gs, v1.50.9 wireless network in my house. I have 2 teenage kids both with laptops...
    I'd like to be able to see what sites they're browsing (ie firewall logs) - but without installing something like 'netnanny ' on each laptop (there apears to be a log setup on the router but doesnt record anything let alone outgoing traffic)
    I know I can bar sites through the setup...but does anyone know of any app that will record from the router, who's looked at what site?,,,so I know (quietly!) what they're looking at?
    Cheers.

    Why not ask in the Flash or Actionscript forum; this is the Flash Player forum.

  • Very very simple question but..

    public class zhen {
    public static void main(String[] args)
    String yourname;
    yourname=Console.readLine("Please enter your name.");
    System.out.println("Hello,"+yourname);
    copy from the corejava book, but its not work, i feel strange. also, corejava book said that need to import corejava.*; but i copy and run it in jcreator, so i remove the import corejava.*.
    Who can help me? it is too simple and embrass me.

    I am not familiar with the corejava book, but here is an example that will work without any extra libraries, and will probably be more help to you in the long run.
    import java.io.*;
    public class Test
        public static void main(String[] args)
             try {
                 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                 System.out.print("Please enter your name:");
                 String yourname = br.readLine();
                 System.out.println("Hello," + yourname);
             } catch(Exception e) {
                 e.printStackTrace();
    }Here's a link to an I/O tutorial that should also help:
    http://java.sun.com/docs/books/tutorial/essential/io/index.html

  • Simple question but can't find an answer anywhere

    This must surely be a very easy question for someone to
    answer (although I can't find an answer from any tutorial or
    forums, despite lots and lots of Google searching).
    I want to create a link from one SWF file to another (when
    these two files are 'stand alonE', not online). How do I it?
    I've managed to use Actionscript to create links to a website
    and another scene within the same SWF, so I'm surprised that this
    is proving so much more difficult.
    The script I have that's not working is:
    lesson1_btn.onRelease = function (){
    gotoAndStop("lessons.swf");
    (BY THE WAY Before you recommend I put everything online,
    this is for coursework and it specifies that the whole thing must
    be stand-alone.)
    Could the problem be with my Flash Player or the way I'm
    vieiwng the SWF? It doesn't work in test mode but neither does it
    work when I open the SWF directly from it's location.

    I'm not sure what you're doing with the
    gotoAndStop("lessons.swf"); command - whether lessons.swf is
    a scene or a frame label. If its a scene, then I think you need a
    frame number as well. (actually I don't know - I don't use this
    function)
    But you
    might want to take a look at the comments at the bottom of
    this page, I think - not sure if its relevant, but it seems like it
    could be :
    http://livedocs.adobe.com/flash/8/main/00001733.html#135769

  • Simple question, but can  you please help?

    i'm just getting into fooling around with Java on my PC, and i'm
    having some problems running this demo class that i created through one of the online tutorials. when i attempt to run it, i
    use:
    java -classpath c:\jhikel\divelog divelog.DiveLog
    but it give me an error:
    Exception in thread "main" java.lang.NoClassDefFoundError: divelog/DiveLog
    i am using the correct classpath for this class -- it is a simple class
    DiveLog in the divelog package that i created. can anyone help me out?
    thanks

    If the path structure is c:\jhikel\divelog\DiveLog.class and the package statement in DiveLog.java is
    "package divelog;"
    Then the classpath should be .;c:\jhikel
    because Java combines the classpath and the package to created a pointer to the DiveLog.class file.

  • A simple question but difficute for me

    I'm trying to write a simple java applet that is able to repond actions from "mouse" and "key board". But surprisingly, it can only repond actions from "mouse". I know that the functions "KeyDown" and "MouseDown" are depreicated methods, but they should still work though. If "MouseDown" can work, why "keyDown" is not working?
    import java.awt.*;
    import java.applet.Applet;
    public class Key extends Applet {
    public void paint(Graphics g){
    g.drawString("Hello", 50, 50);
    public boolean keyDown (Event e, int key){
    System.out.println("key down");
    return true;
    public boolean mouseDown (Event e, int x, int y){
    System.out.println("mouse pressed");
    return true;
    }

    then you need ActionListener
    for example
    addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
            jButton1_actionPerformed(e);
        });

  • TS2972 apple tv can't sign in to iTunes Store until the network time has been set. this is an Apple generated message. what does it mean? how can i fix it? very very very simple questions but there is no reasonable answer from Apple anywhere on the intern

    this is an apple generated message. simple!
    what does it mean? so far no one at apple has a clue.
    how do i fix it? nothing even begins to address this issue so far. generalities about system setup show a lack of respect for customers. yes my system is plugged in and i have reset and rebooted and rechecked everything. i need help because this a real problem that needs a real solution, not more platitudes.
    help please, not more wasting of my time. i have spent an entire afternoon on this already.

    this is exactly the kind of response i expected, almost begged support to please not do this to me and yet there it is another meaningless, non helpful, standard template response to restart my apple tv.
    this does NOT work which is why i am contacting you. i have tried all suggestions about unplugging and restarting and nothing works.
    i live in an apartment and logon to the provided wifi wireless. so i do not have access to a router. however, management says they have talked with their provider and have been assured that the required ports are available.
    remember all the jokes about how bad windows was because the solution was always to re boot. funny huh? how is apple any different.
    i have been to the local apple care store and they are clueless, too.
    should we just end it here and you admit that i will not be getting any support from apple on this one? i got the ipad because my kids were such big fans. it is difficult for me to share their enthusiasm.
    at this point i am just curious about how you say you cannot support your own product so i can complete my file on this contact.
    thanks...sorry it was you who got this problem..

  • Repost: Simple question but no one answers

    I have to repost this, there is no way I can find the solution on the forums. Tried everything...
    Scenario:
    UIX page with READ-ONLY table. User selects some row and clicks button. Event fires.
    How to retreive selected READ-ONLY row????
    Please help, this is urgent. I would need some code or pseudo code.

    Finally I did it. Here is how.
    In UIX page with a table drop submit button and add event to it:
    <event name="cur">
    <method method="myCurrentRow" class="model.TestUtils"/>
    </event>then create custom java class:
    package model;
    import javax.servlet.http.HttpServletRequest;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.model.binding.DCUtil;
    import oracle.adf.model.servlet.HttpBindingContext;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.servlet.event.EventResult;
    import oracle.cabo.servlet.event.PageEvent;
    import oracle.jbo.Row;
    public class TestUtils
    public static EventResult myCurrentRow(BajaContext bc, Page page, PageEvent event)
        HttpServletRequest request = bc.getServletRequest() ;
        BindingContext bcc = HttpBindingContext.getContext(request);
        DCBindingContainer dbc = DCUtil.findBindingContainer(bcc,"dataPage1UIModel");
        DCIteratorBinding study = dbc.getIteratorBinding("StudyView1",null , "StudyView1Iterator");
        Row currentRow = study.getNavigatableRowIterator().getCurrentRow();
        Object[] o = currentRow.getAttributeValues();   
        for (int i=0, l=o.length; i<l; i++)
          System.out.println("i = " + i + "o= " + o[i]);
    return null;
    //return new EventResult(new Page (page, "ForwardName"));

  • This is prob a real simple question - but i am new to the ipod experience

    so please be gentle with me. i got a nano recently and love everything about it, and in relation to iunes it has taken over as my media player.
    however tonight when i hooked up the nano to change the laylists etc i get the recognition of the nano, the list of tracks on it but i am an unable to update it. now i have ched the settings and nothing has changed over the last week of use, except for a small locked padlock down on the bottom section of the itunes menu (next to the space gauge for the nano) and i cant work out how to remove it or change it. the nano is not in the HOLD position and i have no active parental controls.
    i am lost and what annoys me most is it is prob the simplest thing to fix (if you know how). so could any of you fine people tell the idiot what he has done wrong?
    thanks
    the itunes idiot

    The padlock icon indicates that iTunes is set for automatic synchronization to your iPod. Any changes you make in iTunes should automatically be reflected on your iPod. Are you attempting to make changes directly on your iPod as mounted in iTunes (which you cannot do unless you set iTunes for manual synchronization); i.e. you're trying to alter the playlists and tracks as shown under the disclosure list for your iPod in the iTunes Source list? Or are you changing the playlists, etc. created in iTunes?
    If you're not clear on all of this, you might find the iPod/iTunes tutorials helpful.
    Regards.
    Message was edited by: Dave Sawyer

  • Some simple question , but i dont know...try & catch ..

    Hi i was working on a media player and i've faced some problems...like what exactly does the try&catch do ??
    and in the Player class what the realize() and prefetch do ??
    Thank you in advance..
    Mulham Haffar

    If you are in doubt when or what exceptions to catch, use the java compiler as your guide. You will get compile time errors that clearly name the exception you have to catch with the line of code that could cause the exception/error. Then do the following:
    try {
      // the code that could throw the exception
    } catch ([the-name-exception] e) {
      e.printStackTrace();
      // or do something else relevant here - this code gets executed when the exception is thrown
    } finally {
      // this is an optional block that is always executed before returning from the method (even if there was an exception thrown - do stuff like closing resources here
    }where [the-name-exception] is the exception class I mentioned earlier.
    You can also declare a method to throw the exception if you don't want to catch it. Just use the keyword "throws" followed by the class name of the exception. Then any place where you call the method will have to catch the exception.
    You can also find out what exceptions are being thrown by looking in the JavaDocs. There is plenty more, but that is what you will need to get your program compiling.

  • Simple Question - Need URGENT Answer! II

    What is the cheapest hard drive from this search that's 10GB or higher and would work in a Powerbook 145 or 160?
    Link

    OK, I have decided and this is my shopping list? I think it'll work, right?
    Hard Disk:
    http://cgi.ebay.com/20GB-Hitachi-Travelstar-2-5-Laptop-Hard-Drive_W0QQitemZ32007 0395450QQihZ011QQcategoryZ99248QQssPageNameZWDVWQQrdZ1QQcmdZViewItem
    Powerbook:
    http://cgi.ebay.com/Apple-PowerBook-1400cs-Microsoft-Office-Holds-Charge_W0QQite mZ110077445586QQihZ001QQcategoryZ4606QQssPageNameZWDVWQQrdZ1QQcmdZViewItem
    Ethernet Adapter:
    http://cgi.ebay.com/ASANTE-ETHERNET-TO-LOCALTALK-BRIDGE-FOR-MAC_W0QQitemZ1300670 54134QQihZ003QQcategoryZ25436QQssPageNameZWDVWQQrdZ1QQcmdZViewItem
    SCSI adapter to connect the 1400cs to my AppleCD 300e to install OS8:
    http://cgi.ebay.com/Apple-HDI-SCSI-Adapter-for-G3-Powerbooks_W0QQitemZ2900672130 57QQihZ019QQcategoryZ80052QQrdZ1QQssPageNameZWD1VQQcmdZViewItem
    [366mhz Graphite iBook SE with OS X 10.2.8/9.2.2. Dual Boot] [eMac OS 10.3.9]     [2GB White iPod Nano] [Power Macintosh 4400 OS 8.1] [Mac LC III OS 7.6.0]

  • Simple Question - Need URGENT Answer!

    Would this hard disk work in a PowerBook 1400cs/113 considering that I would divide it into partitions of 8GB and use the left over space for one more partition? And is it the right kind of drive?
    Link to the drive:
    http://tinyurl.com/yboc7t

    I would say no. That looks like a desktop hard drive. The specifications say it's 1 inch tall.
    http://www.samsung.com/Products/HardDiskDrive/SpinPointVSeries/HardDiskDriveSpinPointVSeries_SV3002Hsp.htm
    You need an IDE laptop drive with a maximum height of 17mm. Also keep in mind that the mounting screws on most modern drives will be in the wrong place for your mounting tray. There is a company that sells a drive sled with the correct mouning holes for newer drives.
    http://www.insanely-great.com/features/020121.html
    You are correct about partitioning. You need partitions of less than 8.2 GB. If you're running OS 8.6 or later, you don't need to worry about this size limitation.

Maybe you are looking for

  • Some of my pictures do not show up in my camera roll

    Question. I recently bought the iphone 5s and had all of my contacts, photos, etc tranferred from my old iphone 4 to the 5s. Everything transferred as it should have, except for some of my pictures in my camera roll. My camera roll shows I have 840 p

  • Query regarding Form Object

    Dear All, In my Add On, I have many forms and I am using only one form object for all the forms. Is it permissible or I have to use different form objects for each form. When I am navigating from One form to other I am getting error as Invalid Form.

  • My contacts have disappeared

    I just went to look up an address on my iPhone and all my contacts have disappeared. My groups are there but ALL contacts are gone. Went to check my MacBook and they have disappeared from the iPhone as well. I am using Lion and iCloud. This is a disa

  • Issues while upgrading the db of  an 11iEBS application , 10.2.0.4 to 11gR2

    Team, I am following the doc is: 881505.1 to upgrade the DB(10.2.0.4.0) of an 11iEBS application to 11gR2. From the Doc I have completed steps till 13. Now doing the actual upgrade following the doc Oracle Database Upgrade Guide 11g Release 2 (11.2).

  • Pap2 Issue when username contains @

    Hi, I'm unable to use my PAP2 because my voip provide uses a username that is my email address. The PAP2 is unable to sign in if the username contains a @ (I've tried with a friend account without the @ and it works) Is there a specific syntax to use