Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

the name of the Jform I am using

Name: Anonymous 2012-12-04 15:43

How can I get the name of the Jform I am using?

public class WindowInsertPacient extends javax.swing.JFrame {
    private WindowMain father;
public WindowInsertPacient(WindowMain father) {
        this.father = father;
        initComponents();
    }


private void myWindowClosing(java.awt.event.WindowEvent evt) {                                
        Class enclosingClass = getClass().getEnclosingClass();
        addWindowListener(new java.awt.event.WindowAdapter() {
            @Override
            public void windowClosing(java.awt.event.WindowEvent windowEvent) {
                enclosingClass.this.setVisible(false);
                enclosingClass.this.dispose();
                father.setEnabled(true);
            }
        });
    }

It says cannot find symbol.

Name: Anonymous 2012-12-04 15:44

Where does it say that...

Name: Anonymous 2012-12-04 15:59

JAVA IS GRATE

Name: Anonymous 2012-12-04 16:20

That was ENTERPRISE quality!

Name: Anonymous 2012-12-04 16:37

The jews are after me.

Name: Anonymous 2012-12-04 20:46

maybe try this instead:


enclosingClass.setVisible(false);
enclosingClass.dispose();

Name: Anonymous 2012-12-04 20:56

private void myWindowClosing(java.awt.event.WindowEvent evt) {                               
        final WindowInsertPacient jFrame = this;
        addWindowListener(new java.awt.event.WindowAdapter() {
            @Override
            public void windowClosing(java.awt.event.WindowEvent windowEvent) {
                jFrame.setVisible(false);
                jFrame.dispose();
                father.setEnabled(true);
            }
        });
    }

Name: Anonymous 2012-12-04 21:39

>>2
at
enclosingClass.this.setVisible(false);
                enclosingClass.this.dispose();

Name: Anonymous 2012-12-04 21:42

>>7
final WindowInsertPacient

I want it to get the class name automatically.

I want to reuse the code.

Name: Anonymous 2012-12-04 22:36

doesn't it have to be marked final?

Name: Anonymous 2012-12-04 22:59

>>10
Ok, I marked it final but it still doesn't recognizes the .setVisile(false) and the .dispose() methods:

    private void myWindowClosing(java.awt.event.WindowEvent evt) {                                
        final Class<?> enclosingClass = getClass().getEnclosingClass();
        addWindowListener(new java.awt.event.WindowAdapter() {
            @Override
            public void windowClosing(java.awt.event.WindowEvent windowEvent) {
                enclosingClass.setVisible(false);
                enclosingClass.dispose();
                father.setEnabled(true);
            }
        });
    }

Name: Anonymous 2012-12-04 22:59

>>11
*recognize

Name: Anonymous 2012-12-04 23:15

Just by any chance WindowMain is not another instance of JFrame and you can't do
[code]father.setVisible(false);
father.dispose();
father.setEnabled(true);/code]
can you?

Name: Anonymous 2012-12-04 23:18

*another descendant of JFrame

Name: Anonymous 2012-12-04 23:30

Just saw this on le /jp/.

Can't you use the `this` key word?

http://docs.oracle.com/javase/tutorial/java/javaOO/thiskey.html

Name: Anonymous 2012-12-04 23:33

BTW, on /jp/ 'sage' is polite so don't get offended.

Sorry for double post orz

Name: Anonymous 2012-12-05 0:04

>>13
I can.
>>15
Can't you use the `this` key word?
Nope.

It only works if I write it like this:

WindowInsertPacient.this.setVisible(false);
WindowInsertPacient.this.dispose();

Name: Anonymous 2012-12-05 1:01

bymp

Name: Anonymous 2012-12-05 5:39

Look into [/code]java.lang.reflect.Method[/code]

Name: Anonymous 2012-12-05 13:17

                  ───────────────────────────────────────────────────────────────┐
   DUBZ                                                                          │
                                                                                 │
                  ────────────────────────────────────────────────────────┐      │
                                                                          │      │
                                                                          │      │
                                                                          │      │
                                                                          │      │
                                                                          │      │
                                                                          │      │
                                                                          │      │
                                                                          │      │
                                                                          │      │
                                                                          │      │
                                                                          │      │

Name: Anonymous 2012-12-05 13:17

                                                                          │      │
                                                                          │      │
                                                                          │      │
                                                                          │      │
                                                                          │      │
                                                                          │      │

Name: Anonymous 2012-12-05 13:17

                                                                          │      │
       _____________                                                      │      │
      (_________ _.'``''-┌────────────────────────────────────────────────┘      │
          (___.-' _,     │                                                       │
           (_(_.-'  `    │  o                                                    │
            (__)__,-"``'-└───────────────────────────────────────────────────────┘

Name: Anonymous 2012-12-05 15:13

Maybe try this instead:

(define form (lambda (x) (cudder x)))

Name: Anonymous 2012-12-05 19:53

>>20 >>21-22

holy fucking shit, epic as fucking fuck! xDDD)))) oppa checked'em style

Name: Anonymous 2012-12-05 19:56

check 'em

Name: Anonymous 2013-09-01 19:59



     ',         ./:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::_ハ _,,. -┐  /      /
     ',   ___,,.へ./:::::::/\:::::::::::::__::::::::::::::::::::_;;:-‐''"      |_____    / 
     ',  「     `` ヽ、_ハ-'ァ´ ハ⌒ヽ-''"  _,,.         / /
      rソ     \__  >''`'ー---─'--<   _;:イ___    /  _,、∧/
\     く   >'"::;:- '"´ ̄`ヽ、::::-─- '"´ ̄ `ヽ、:::::::::`"'<  「  
       ノ>'"_:;ア´                    ヽ、::::::::::::<
    _,,.:::''":::::ア´ /  , '´   /     i    ',    i   Y:::::::::::::_;> 嫌 何
..,,_ く;::::::::::::::/  /  /   i. 、,'  ハ  ,ハ   ,i   ハ_   iヽ;__;;;:::::>   い が
    `ヽ、::::ノ  ,'  .i   ハ  i\/ ', / i  / i ,.イ´./i   !  i /   .か
_____   ,,.イ   i   i  ./ ァ'" ̄`ヽー/  | /,ァ''" ̄`ヽハ  ハ ∠_    よ
    ∧ '" /| ノ ,ハイ   i'´'`i     レ'  i'´'`i.   ト| / i  ヽ7   り
\∧/  Vi/  |_,. -‐ァi/    !__,リ          !__,リ   ' レ'_ン  i /へ
            / |   `'' ー-         -‐ ''´  i ハ'   ハ   i\/V\/
    自  何  ∠,ハ ""       `       ""〈 ,.イ ./ !    ',  ---─
    分  が   /从   /´ ̄`' ー--‐ '"´ ̄`ヽ   ハ ノ /‐ 、'    ヽ.
    を.   好   /_ ,.へ. i `'' ー- ー─-‐‐ ''" i ,.イ人iハr'   ヽ、. ヽ. ', - ..,,__
    語  き   /|  .ノヽ、r'´        ``ン'7 i ノ       ヽ. ヘ/
    れ  か  く  |/ i::::::`i>.、.,,_______,,.. イ:::::::iヽへi        Y   \
    よ  で    >  ,イ::::::::::|ヽ、.,____l_」___,.イi::::::::>-く         | ',   \
    !!!      <  |/:::::::::::|_____  |o|   __rへi_ン-‐ァ    _r'-イ> ',

Name: Anonymous 2013-09-01 20:02

>>22
Terrible dubs.

Don't change these.
Name: Email:
Entire Thread Thread List