Answers for "hide frame ( acces to the top level component )"

0

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 :-)

        }
Posted by: Guest on April-30-2022

Code answers related to "hide frame ( acces to the top level component )"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language