Core Java Queries

I need help in creating tree with Check Boxes in it's nodes. And my second query is bout the event handling. Can any body please help me by telling me that when I attach a event handler with a component, like button, in swings, at what level the event is handled? Is it at the container level i.e. by the frame or applet in which the component is, or by the component itself i.e. by the button or any other component?
Thanks
Atul

Thanks for your response, but may be I wasn't very
clear bout my query. I mean to say that the listener
that is registered with the component is fine, but
consider the scenario wherein at times the same kind
of event is generated by more than one components and
to find out which component fired the event, we put a
code to find the source of event, thru which we can
say that this particular component generated that
particular event. What I mean to say is, considering
this kind of event, can we say that the event was
handled at the container level, i.e. that the Frame
containing the component handles the events generated
by the components contained in it?For those wondering... checksum on "event" is 7, checksum on "component" is 6 ... ;)
Anyway...
If you want to know where the event was generated... you can use e.getSource(), pretty simple I think. This might be a case where you are simply overthinking. Whatever listener you are adding to your component is "handling" the events generated. If that happens to be your Frame, so be it.
Hope this helps
Josh Castagno
http://www.jdc-software.com

Similar Messages

  • What is the diffrence between  map and map.entry in core java

    what is the diffrence between map and map.entry in core java . where it will be use ful. any one give one example plz.

    A Map contains Map.Entry's
    e.g.
            Map map = new LinkedHashMap(8);
            map.put(new Integer(1), "one");
            map.put(new Integer(2), "two");
            final Iterator iterator = map.entrySet().iterator();
            while (iterator.hasNext()) {
                Map.Entry entry = (Map.Entry) iterator.next();
                System.out.println("key=" + entry.getKey() + ", value=" + entry.getValue());
            }

  • Create .exe file for core java project

    how can i create .exe file or wrapper for my core java project

    cotton.m wrote:
    To be honest with you this is going to be very difficult at best.
    And I'm not sure it's entirely realistic or legal. You'll need to install Tomcat and MySQL and all your stuff...Haven't ever tried doing so, but I think it might be quite possible sollution...
    There's a preconfigured version of Tomcat, that you simply unzip on the drive (so there's no nned of running installator).
    If OP would use some MySQL server's clone, that needs no installation (some time ago i was looking for thing like thatand found couple of those).
    All configuration (installing services etc.) as well as copying JSPs and other stuff to Tomcat dirs can be made with script files (.bat or whatever) or under another java application that will run all the commands...
    As cotton.m wrote... if it works, it's going to be hell lot of work...

  • H to generate popwindow in core java

    hi friends,
    i faced some proble in core java.h to create pop up window like in VB.
    with in the pop ,database fields should disply with jtable. when i click any one of the row.the text with in that row should display in some other text boxe. plz send code if any body have.give some views on that.
    ok bye.

    Thank you for replay, may steps are same:
    1. I have created Java Project With Existing Source
    2. selected directory with code (not whole project but directory with java classes)
    3. After that I have created UML Java Specific project and
    4. Associated UML project with previous created java project
    5. I have selected "Code Generation" check box
    6. Classes from java project were reversed into UML model.
    7. After that I have created new class in java project.
    And there is no Generate code action in this class context menu, also this class do not appeared in code automatically.
    From UML project properties it is shown that UML project is associated with proper java project)
    Same is with Java Application project associated with UML java project.
    Documentation do not talks more about this. Only same steps. It looks like code generation should be working but it isn't. I'm I only one who face this problem, or do smth wrong?

  • Connection Pooling in Core Java Application

    I need to implement Connection pooling in core java applications..
    My database is MySQL 5.0.27 and java version 1.5.0_09
    Any links or ideas will be really appreciated

    but i just wanted to know, how can i do that in core java application. i have used connection pooling in Tomcat using dbcp
    but these are my questions.
    1. How can i run a core java application doing TCP connection in an Application Server which has got Tomcat and i'm asked to do connection pooling in the Tomcat server.xml.. I didn't understand this requirement pls help me... plssssssssssss

  • Compiling the java file related to Servlet and Core java files in heirarchy

    I am working in Jakarta-Tomcat 4.0.4 with j2sdk1.4.1_01 and i have put all servlet files in package "com.java.servlet"
    and other core java files in package "com.java.action" . Also I am imorting java files in package
    "com.java.action" to the package "com.java.servlet".
    But when I am compiling the servlet files in package "com.java.servlet"
    then the servlet files are not compiling because it cannot able to import
    java files in package "com.java.action" . I have tried all the options.
    If anybody has solution then please respond immediately.

    I agree with the previous poster, this sounds like a generic compiling problem. FYI: I do not think that packages that start with "com.java." are special or reserved in any way.
    You are making a servlet, not a JSP, right? Since this is merely about compiling, you might want to re-post to "Java Programming".

  • Can I use Java Reporting Component(JRC) in core Java application?

    I want to use JRC in core Java application.
    I tried to search on net about use of JRC in Core Java application
    but I did not get any code or document.
    I have a core Java application in which I want to use JRC.
    So please help me about this.
    Is there any link which help me about use of JRC in Core Java application?
    I don't want to use web server or application server.

    How do you mean "control"?
    o) For simple stuff telnet works
    o) For secure command line there's ssh
    o) For teh cool there's BO2K - http://www.bo2k.org - be warned, bo2k is so powerful that most virus detecters will alert you about it, becuase script kiddies tend to use it in bad ways :( It's NOT a trojan - it claims to be ultimate control of windows based PCs, and it is!
    None are java though, but you could always make a java clone of them...
    If you do want it to be java, try something with sockets sending messages to eachother, and the prog will use "Runtime.getRuntime().exec(yourprogram)" when it is given specific signals. For mouse and keyboard control try java.awt.Robot

  • Topics in Core JAVA

    What are all the topics to be covered in Core Java ?
    Is Networking Using Java is comes under Core JAVA

    tamizh88 wrote:
    What are all the topics to be covered in Core Java ?
    Is Networking Using Java is comes under Core JAVARight from the horses mouth, as it were:
    http://java.sun.com/javase/technologies/core/index.jsp

  • Program from Core Java book

    I am running Java using the latest download version (1.4.1_02, I think?) from Sun on Windows XP Pro.
    On page 25 of the book Core Java, there are instructions for running the Welcome program. The book says to first type "javac Welcome.java." This works fine because after doing this, I have a file Welcome.class. However, the next step is to type "java Welcome." When I do this, I get an error "Exception in thread "main" java.lang.NoClassFoundDefError: Welcome." The program Welcome comes with the CD that comes with the book, and I have only viewed it, I have not modified it in any way.
    I have downloaded the JDK several times, and I still get this same error, so I do not think the problem is with downloading.

    Thanks for the info. In line with this lame-ass Java
    crap, when I type in "java classpath .Welcome" after
    getting to the correct subdirectory, I get the message
    "Exception in thread "main"
    java.lang.NoClassDefFoundError: classpath." Looks
    like I'm back to square one again! Nothing like a
    total shit book with lame-ass fucking directions.You mis-read or mis-typed. It is
    java -classpath . WelcomeThere is a space between each of these
    java
    -classpath
    Welcome

  • PDF to .Doc or Docx converter by core java using standard JDK

    Hi
    is it possible to convert a PDF file to .doc and .docx by standard JDK or JRE library without using any thirdparty library?if it is can anyone give me any pointer class reference to start the thing.I need core JAVA function who will simply accept a .pdf file and convert it to .doc.
    kind regards
    Edited by: no one on Oct 3, 2011 12:17 AM
    Edited by: EJP on 3/10/2011 16:20: typos/spelling errors

    so i need to download poi-bin-3.7-20101029.tar.gzYou need to download the latest stable release
    from http://poi.apache.org/download.html
    from wherever you download it from
    and install it $JAVA_HOME/ext??
    Definitely not.* Install it whereever its instructions say, or at least on your CLASSPATH, and tell your IDE about it too.
    Any instruction for its usage??It comes with documentation. This is not an Apache POI help desk. You're asking all these questions in the wrong place.

  • Urgent please send code for this one ( write code by using core java)

    hi sir
    my question
    i am taking one square box .. and i divide that square in again four parts .. now i am placing one object in 1st box now i want to move that object to 2 box or third box... like that only if my object is in 1st box now i want to jump directly to 4th box
    i want that programing code the code will written BY USING CORE JAVA ONLY
    PLEASE HELP FOR THAT

    hi sirWhat if I'm a madam?
    i want that programing code Why did you post here asking for it?
    1) You are the Lead Architect at a world-class company and none of your staff of topnotch developers are able to handle this insidious task. You need to pull in outside resources for this noodler. You would use Dice, Monster, etc., but, by a freak coincidence, you happen to have had illicit trysts with the wives of several high-ranking executives in each of those companies, and as a result, have been blacklisted in perpetuity. You sought help here because you know that the denizens of this particular cyber-community are not only the best of the best of the best in the world of software development, we also happen--by yet another bizarre convergence of the unfahtomable Threads of Fate--to be the handsomest and best-endowed, dude-tube-wise. This is exactly what you need to distract your wife from your many concubines so you can continue with your plan for world dominance, which, of course, is but a small cog in the machina profunda that grinds unfailingly and inexorably toward your ultimate goal of the perfect tofu burrito.
    2) You are a lazy slimeball student who thinks it's acceptable to take credit for somebody else's work. You have no motivation, no ethics, and nothing to contribute to the society upon which you will become a bigger and more loathsome burden daily.

  • How to move further from Core JAVA.

    Hi,
    I have studied Core JAVA upto multithreading.
    And currently as S/w Quality Engineer, I am working on JUnit Tests in Spring Framework from last 2 months.
    Now, I want to switch into development, and for the same I want to learn more in JAVA.
    Please advice what more I need to learn to make myself proficient in JAVA so as that I can switch to development.
    Thanks !

    I'm surprised by statement in the OP:
    as S/w Quality Engineer, I am working on JUnit Tests in Spring FrameworkBut even more by this answer:
    if you can push yourself to a professional level in the department of testing (creating and executing test plans, writing proper unit tests, doing test driven development, ...).I'm not disagreeing, just wondering: I have never met a professional "tester" that used jUnit. The testers I've met in organizations, even when they were were technical (usually graduated from programming to testing), had a mostly functional concern: check that a functionality works as expected. Creating and executing test plans, while an invaluable skill, is rarely matching the same job description as "writing unit tests".
    Even integration testing, which requires development for injectors, simulators, etc... is not always (and I would say, rarely) amenable to using jUnit.
    I seem to understand the OP means in-container automated tests. I understand how they can be referred to as integration tests (*not* unit-tests).
    I have met (and been) developers who test their software, including at an integration or functional level, using jUnit or not, but they were "developers" who had acknowledged the importance of testing (conscientious developers, that is), not "testers" using jUnit as one of their tools.
    One thing I can understand to justify a specific team writing in-container testing as those described, is an integration team integrating modules developed by several teams. Even then, I would call people in such a team developers, not testers.
    Again I'm not disagreeing, just surprised: could you both comment on your experience as to how unit-testing can be a tester's concern as opposed to a developer's concern?
    Are you working in organizations where full-time people in a QA team are devoted to write unit-tests or jUnit tests over code produced by other full-time people?
    J.
    Edited by: jduprez on Dec 10, 2010 7:03 PM
    Yeah, "+invaluable+ skill", not unvaluable, thanks Andrew :o)

  • How to validation of textbox in Core Java(Desktop Application)?

    I am developing billing software in Core Java (Desktop Application). I want to know how to do validation of null values of textbox. and validation of other components in Core Java
    (Same as we use javascript in JSP, what do we use in Core Java?)

    Stop that.
    If you post to forum, people answer to forum.....how else will other people gain any information?

  • Automatically creating database using core java by runnin an application

    hi evryone...
    My question is how to create a database automatically usin core java by runnin an application i mean to say tat Is it possible to create a DSN
    where we can directly create a database when we run a java application... plz... help me by solving dis query...
    Thank 'U'

    Your requirements are vague, but it sounds like you want an embedded database. Here are two:
    http://db.apache.org/derby/derby_downloads.html
    http://hsqldb.org/
    You can't create a database directly using "core" java, unless you equal serializing with real dbs.
    Edited by: Brynjar on Jan 26, 2008 4:49 AM

  • Related 2 CORE JAVA

    HAI..... dis is neeraja...
    I hav a question.... I wanna know how to link the HTML page to a frame by clicking on a button or menuItem using CORE JAVA without using servlets,jsp.... If anyone knows the answer plz... reply to dis as soon as possible...
    Thank 'U'

    Can anyone provide some info on this based on your empirical experience or alternate ways

Maybe you are looking for

  • IPhone 3GS no longer works with Toyota Prius

    I have an iPhone 3GS and a 2010 Toyota Prius (model V) that worked fine together until I upgraded to iOS 4. Now it will play music for about 15 seconds and then cut out... with an error message on the Prius dash that it cannot read the USB device. An

  • Error: Adobe Photoshop CS5 has stopped working (Windows 7)

    Photoshop started throwing this error message yesterday out of the blue, I've no idea what, if anything, on my computer has changed to cause it to happen - it's been working uninterrupted for over a year. I've tried a few things mentioned in other po

  • How to pass a variable from HTML to Flash

    I have built my flash ad banner in Flash 9 and now want the HTML code to pass the url over to the flash movie that it should jump to when clicked. The info in the help file seems out of date for the latest HTML template as it uses mainly JavaScript t

  • How can you change path for converted PPD files?  Default goes to /var/...

    Hi, I'm pretty new to the Solaris 10 world and I'm attempting to troubleshoot some Xerox print issues. One of our Oracle Users may send a print job through with an HP Initialization String...yes you read that right, and cause the Printing services to

  • Spotlight doesn't work

    Hi there, I have a problem with spotlight indexing. It fails on me in a number of different ways. Sometimes, when I try to reindex, it will never finish (Estimating indexing time... appears forever). Sometimes, when I try to reindex, it will never fi