Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

hide frame ( acces to the top level component )

public void actionPerformed(final ActionEvent e) {

            boolean success = true;
            if (success == false) {
                System.out.println("Could not connect");
                return;
            }

            Window frame = SwingUtilities.windowForComponent((Component) e
                    .getSource());
            frame.setVisible(false); //no problem :-)

        }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #hide #frame #acces #top #level #component
ADD COMMENT
Topic
Name
2+5 =