Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #35745

Is there a better way to reference this?

Newsgroups comp.lang.java.programmer
Date 2016-10-11 06:51 -0700
Message-ID <7fd3908d-6705-4034-99ee-08e4e3a4a4c6@googlegroups.com> (permalink)
Subject Is there a better way to reference this?
From Eric Douglas <e.d.programmer@gmail.com>

Show all headers | View raw


How to grab the instance from the inside without assigning?
Sample:

     HashSet<JTable> storeTable = new HashSet();
     JTable myTable = new JTable() {
          {
               final JTable ref = this;
               addFocusListener(new FocusListener() {

                    @Override
                    public void focusGained(FocusEvent e) {
                         storeTable.add(ref);
                    }

                    @Override
                    public void focusLost(FocusEvent e) {
                    }
                    
               });
               
          }
     };

Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Is there a better way to reference this? Eric Douglas <e.d.programmer@gmail.com> - 2016-10-11 06:51 -0700
  Re: Is there a better way to reference this? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-10-11 10:25 -0400
    Re: Is there a better way to reference this? Eric Douglas <e.d.programmer@gmail.com> - 2016-10-11 07:37 -0700
      Re: Is there a better way to reference this? Sebastian <nowhere@nirvana.org> - 2016-10-11 22:08 +0200

csiph-web