How to indicate the object of the super Class ?

hello,
I need to notify when one dialog is close to the class that generated it.
Of course I do it from the method windowClosing() in the class WindowAdapter.
But if I use "this" how parameter in the method, I noted the value is that of the inner anonymous class, and not that of the dialog class.
I write down some code to reproduce the problem ....
public ReferenceToTheSuperClass() {
        final SecondClass sc = new SecondClass(this);
        jButton1 = new javax.swing.JButton();
//        final ReferenceToTheSuperClass xx = this;
        jButton1.setText("jButton1");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                 sc.checkSuper(xx);                    // work
                 sc.checkSuper(this);                   // not work
                 sc.checkSuper(super.getClass()); // not work
}  // ReferenceToTheSuperClass
class SecondClass {
    ReferenceToTheSuperClass superiorClass;
    public SecondClass(ReferenceToTheSuperClass supClass){
        superiorClass = supClass;
    public void checkSuper(Object o){
        if (o instanceof ReferenceToTheSuperClass){
            JOptionPane.showMessageDialog(null,"HELLO");
} // SecondClass My ask is: It is possible to indicate the value of the instance of the super Class, inside one his anonynimous inner class?
thank you
regards
tonyMrsangelo

thank you for your kinkly answer jeverd,
yes what you say is right, in this case the class is only nested (in the hurry I used a wrong word).
About the sintax, I vould find only a short statement to use inside the inner anomymous class and, reading what you say, I can guess it is not possible to do it..
again thank you
regards
tonyMrsangelo

Similar Messages

  • Help!! How do you keep objects in the same order in a 20 page doc when inserting a new object?

    I am creating a catalog of pictures only, as objects.
    They are organized alphabetically, 4 images per page as a 2x2 grid, for 20 pages.
    I want to insert a NEW object (image) in the middle of these 20 pages, and want all the objects after it to shift over one spot to make room.
    How do I get the objects after the inserted ones to shift, as text would if you inserted more text in the middle of a paragraph?
    I can't figure out how do do that (without just putting the images in a text box and in-line, but then I lose all the spacing controls)...
    Thank you!
    Lawrence

    ID ships with a free Image Catalog script in the sample scripts. You don't need to buy one.
    And that isn't going to do what you want, exactly. You'd have to re-run the script each time you add an image to make a new file, and you don't get to set the sort order yourself.

  • How to determine the object in the tablespace

    Hi
    I have a problem with my database, How can i determine the object in the tablespace
    and how do move old tablespace into new tablespace and how to drop existing tablespace.
    Thanks

    Hi,
    If you want to find for all objects information, you can use dba_segments and filter this against the tablespace name. Once done you can create another tablespace and move the objects from old tablespace to new tablespace. Later you can drop the old tablepspace. You can use the below mention commands also:
    SELECT 'ALTER TABLE '|| table_name ||' MOVE TABLESPACE USERS;'
    FROM user_tables WHERE tablespace_name='MY_TableSpace';
    SELECT 'ALTER INDEX '|| index_name ||' REBUILD TABLESPACE USERS;'
    FROM user_indexes WHERE tablespace_name='MY_TableSpace';
    SELECT 'ALTER TABLE '|| table_name ||' MOVE LOB ('
    || column_name ||') STORE AS (TABLESPACE USERS);'
    FROM user_lobs WHERE tablespace_name='MY_TableSpace';
    On the other hand,
    You can also export a backup of the source tablespace and import into the target tablespace.
    Regards,
    XIC

  • How to create an object within the same class???

    hi im just a newbie
    i v been always creating an object from the main class..
    but how to create an object inside the same class??
    i got main and students class
    the main got an array
    Students[] stu = new Students[]
    and i got
    stu[i] = new Students(id,name);
    i++;
    but i wanna do these things inside the Students class..
    i tried ..but i got errors.....
    how to do this
    .

    javaexpert, :)
    I really have no idea what you are trying to do since you say you've always been creating an object from the main class, yet you always want to create an object inside the same class.
    I'll assume that you have an object in the main class that you are trying to access from the Students class.
    If you are trying to access objects that are contained within the main class FROM the Students class, then know that there are two ways of doing so, one being static, and the other dynamic (look up definitions if unclear):
    1.) make the objects in the main class both static and public and access the the objects using a convention similiar to: Main.object; It's important to note that Main is the name of your main class, and object is a static object. There are better ways of doing this by using gettter/setter methods, but I'll omit that tutorial.
    2.) Create a new instance of the main class and access the objects using a similiar fashion: Main myInstance = new Main(); myInstance.myObject;
    You should really use getter and setter methods but I'll omit the code. In terms of which approach is better, step one is by far.
    I don't mean to be condecending, but you should really brush up on your programming skills before posting to this forum. This is a fundamenetal concept that you will encounter time and time again.

  • How to remove unused objects from the webcatalog In OBIEE11g

    Hi,
    I want to delete unused objects from obiee11g catalog, i know in obiee10g it's working fine (i.e: we can do it via manage catalog then delete the unused objects) is there any way to do it automatically like RPD utility --->removing unused objects from Physical layer in RPD
    fyi: I don't want to delete manualy. i need somethink like button/link to find unused objects(report,filter,folder..etc) from my obiee11g catalog.
    Thanks
    Deva
    Edited by: Devarasu on Nov 29, 2011 12:06 PM
    Edited by: Devarasu on Nov 29, 2011 3:15 PM

    Hi,
    Checked with Oracle Support team and confirmed below points
    --> incorporated into the Current product and consider as BUG it may resolve future release
    --> Currently there isnt any automatic method to remove the unused objects like reports, filters,folder etc from catalog.
    Treated as Bug
    Bug 13440888 - AUTOMATICALLY REMOVE OF UNUSED CATALOG OBJECTS FROM WEBCATALOG
    FYI:
    SR 3-4984291131: How to remove unused objects from the webcatalog in obiee11g
    Thanks
    Deva

  • How to select the objects sharing the same appearance in the same artboard?

    I have several artboards in the file and I want to select all the objects having the drop shadow effect in the artboards I'm working. No matter I use the "Select" in the menu or the "Select similar objects" button in the control panel, it selects all the objects having the same appearance in the entire canvas, not only the one in the artboard I'm working. Any means or there's nothing can do?
    Please help!

    J_Lai wrote:
    yes, that's work and I also tried to lock the objects in another artboard in order to select the objects in the working artboard only. However, I think that's stupid to get it done in this way and Adobe should improve this in the next version.
    This is easy enough to state but if you think this is wrong then you should perhaps suggest a way this feature could be manifested.
    For instance to you this should only effect the current artboard but there will come along another user who will say hey wait a minute I need to select all the drop shadowed objects and remove them now I have to go from atboard to artboard.
    If you see what I mean, II found out that when I find something that is seemingly stupid that in fact there is a reason for it and there has to be a way to describe how it can be improved without breaking what you already have.
    For instance you want it to just effect the current artboard but then there will be those who also want it if it even touches the artboard and those who will want it on a range of atboards and those who will actually want AI to know which artboards you want even without you specifying which artboards. That last one sounds illogical but that is the nature of the problem and the human conditions.
    So though I agree this can be improved perhaps you have an idea how this can work for everyone?

  • How to typecast an object, if the target class name is stored in a str var

    Hi,
    I have a method, in which i will receive an object as an attribute. I need to typecast it to another class, and that class name is stored in a string variable.
    public void printContent(Object obj)
    /* Here i have a variable strClassName - in which a class name is stored.
    I need to create a variable for that class and type cast the object obj into that class. */
    Please kindly help me to find out a way to do this.
    Thanks in advance

    Typecasting does one thing: it enables you to store an object in a reference variable of the target type (if it is of a type which is allowed to be in that variable). It doesn't alter the object in any way.
    Therefore it simply isn't meaningful to talk about typecasting to a type name known only at run time. The whole point of typecasting is to tell the compiler to treat a reference as being of a specified type.
    I don't know what you're trying to do but I think you should probably be looking at the reflection api, getting field an method information from the object's Class object.

  • Copy all the objects from the one system that start with (ZANK)

    hi to all,
    I have installed the name space /ank/ in the US system, we need to copy all the objects from the India system that start with (Zank) and re-create them as /ank/. problem is how can i copy objects and re-create.
    thanks

    Hi Ankal,
    I guess this is your second thread on the same question. Ok provide these information
    >>I have installed the name space /ank/ in the US system,
    Are you saying that you have a machine (US System) and i has a namespace /ank/ ? What all objects are there in this namespace?
    >>we need to copy all the objects from the India system that start with (Zank) and re-create them as /ank/.
    Is the India system on the same US system?
    Also tell me whether you have opened the home page of SAP XI/PI?  If yes , are you able to open Integration Repository? If yes then how these US and India systems are referred in Integration Repository? Are they referred as separate software components?
    Regards
    Suraj

  • Can't scale the objects. The requested transformation would make some objects too small to use.

    How does one remedy this Adobe error message? "Can't scale the objects. The requested transformation would make some objects too small to use." This one always gets me. I'll spend more time trying to find the object in question. This has happened in almost al versions, but this time it's CS5.

    Hmm, possible solution would be to select your object(s), scale them to 90%, and then hit Cmd+D or Control+D to repeat the transformation. I read that sometimes if you scale down too much and too fast it can cause this message.
    Hope this works for you!
    Michael

  • Cannot remove the access control entry object on the object because the ACE isn't present

    Hello,
    I am very new to using Powershell and Exchange Management Shell, and have no prior experience using either of these tools. However, the software I am installing requires me to use the EMS tool in order to set certain permissions for a user in Exchange, which
    will be like the admin account. 
    The command I am attempting to run follows as:
    Get-ExchangeServer | Remove-ADPermission -User $newusername -Deny -ExtendedRights Receive-As -Confirm:$False 
    This throws me an error saying:
    cannot remove the access control entry on the object because the ACE isn't present. I've done some research, and have found that this error is quite common, but the solutions do not apply to what I am specifically trying to accomplish. I am simply trying
    to remove the Receive-As permission for the admin user that I just created.
    Once again, I am very new to Exchange and Powershell, but if there is any advice anyone has, it would greatly appreciated.

    I ran this command, and a very long list was displayed, it looks like everything is there.
    The weird thing is that I was able to run a previous command which granted Receive-As access to the user I am creating: 
    Get-ExchangeServer | Add-ADPermission -User $newusername -accessrights GenericRead, GenericWrite -extendedrights Send-As, Receive-As, ms-Exch-Store-Admin -Confirm:$False 
    The description for the commands to run read to 'grant permissions and to revoke denies, if present'. I'm not sure what this means, but the second part of this pertains to the second command that I am having trouble with:
    Get-ExchangeServer | Remove-ADPermission -User $newusername -Deny -ExtendedRights Receive-As -Confirm:$False

  • I am trying to copy a document and I keep getting the error "Can't paste the objects. The requested transformation would make some objects fall completely off the drawing area."

    I am trying to make duplicate documents with minor adjustments to each and when I try to copy the artwork from one document and paste it into the new document I keep getting the error "Can't paste the objects. The requested transformation would make some objects fall completely off the drawing area." Both documents are exactly the same size, res, color format etc. I even tried to drag and drop and get the same error message. Anyone know what I can do to resolve this issue?

    Try scaling the view size down to 6% or so and then do a Select All. See if there are objects off the artboard which may be causing this error. Most often you will see this if there were guides dragged from a ruler which were selected by dragging the white arrow and then deleted. This leaves the anchor points at the edge of the work area.

  • 1) Is there a function to make all the object to the same size?

    1) Is there a function to make all the object to the same size?
    Solved!
    Go to Solution.

    Sorry, I thought you wanted to align the objects.
    We don't have the function to make objects to same size. You have to edit them one by one. To edit the .lks file can be more efficient.
    Ryan Shi
    National Instruments

  • How to create an object of our own class by using Class.forName()??

    how to create an object of our own class by using Class.forName()??
    plzz anser my qustion soon..

    Class.forName does not create an object. It returns a reference to the Class object that describes the metadata for the class in question--what methods and fields it has, etc.
    To create an object--regardless of whether it's your class or some other class--you could call newInstance on the Class object returned from Class.forName, BUT only if that class has a no-arg constructor that you want to call.
    Class<MyClass> clazz = Class.forName("com.mycompany.MyClass");
    MyClass mine = clazz.newInstance();If you want to use a constructor that takes parameters, you'll have to use java.lang.reflect.Constructor.
    Google for java reflection tutorial for more details.
    BUT reflection is often abused, and often employe when not needed. Why is it that you think you need this?

  • Why Object is a super class in java?

    hi all i have got one basic doubt in java. why Object class is a super class in java. C++ is also a object oriented language but there there is no concept of making object as a super class, but in java why we are having that. thanks

    Personally, I find the fact that C++ (and Delphi) DOES NOT have a common base class something of an inconvenience at times. The reason is that Java is an (almost) pure Object Oriented language, while C++ and Delphi are partially-object-oriented additions to C and Pascal respectively.
    RObin

  • How to make an Object common to all classes

    I am building an application.
    I need that one object (defined in the main class) be accesible to all other objects (classes). Also I need that any other object can change it.
    How can I do that without passing the object's reference around? Actually I pass the reference through a SET method in each object. This is tedious!
    Thanks a lot :)
    iCamps

    You could also create the Object using the singleton pattern. This way there is only one instance of the object, and every object that access it gets a reference to the same object.
    public class SingletonObject {
        private SingletonObject instance;
        static {
            instance = new SingletonObject();
        public SingletonObject getInstance() {
            return instance;
        private SingletonObject() {
            // Constructor
        public synchronized method1() {}
        public synchronized method2() {}
    }Then in your code access the SingletonObject like below. You can put a reference to the object in your constructor for each object that uses the SingletonObject, or jsut access it in the neccessary methods with SingletonObject.getInstance().
    public class YourClass {
        public void someMethod() {
            SingletonObject so = SingletonObject.getInstance();
            so.method1();
            so.method2();
    }

Maybe you are looking for

  • Single table hash clusters

    I created a single table hash cluster like this : create tablespace mssm datafile 'c:\app\mssm01.dbf' size 100m segment space management manual; create cluster hash_cluster_4k ( id number(2) ) size 8192 single table hash is id hashkeys 4 tablespace m

  • External hard drive is unmounted

    I cant find info on how to mount it back in. I dont know how it happened. I have plugged and unplugged power and FW cable but it doesnt show.... thanks for ur help

  • Unable to Retrieve Attributes from LDAP Server

    I have a problem. I was wondering if anyone can assist me. I am new to LDAP servers and JNDI. I cannot retrieve any attributes from the users listed in my data entry. Any assistance would be greatly appreciated! Thanks. I created an entry in the LDAP

  • Timesheet and wage types

    Hi HR gurus, I'm not an hr expert, I've to extract in BW the timesheet (cats) with wage types. I had a look in our catsdb table and wage type column is always empty. does this means I cannot extract timesheet with wage types or there is some function

  • Need seosubcodf table extract from CRM 4.0 system

    Hi, Does anyone has CRM 4.0 system access. I need table SEOSUBCODF extracts. Do reply me soon. Thanks, Saurabh. Edited by: Saurabh Luthra on Apr 6, 2009 1:25 PM