1. How to check the Instance of Jframe Class is running already or not?? forums.netbeans.orgI want to create A JFrame from a Jbutton Handler..but dont want to create more than one instance of JFrame...although Jbutton is clicked more thans once.. So is there any Simple ... |
2. JFrame one instance coderanch.comHi Can't really help you if I can't see your code, but maybe this will help: import javax.swing.*; import java.awt.event.*; public class TestFrame{ JFrame frame; JFrame frame2; JButton button; public TestFrame(){ frame = new JFrame("Main Frame"); frame2 = new JFrame("Second Frame"); button = new JButton("Open Frame"); frame.add(button); frame.setSize(300,300); frame2.setBounds(300,0,300,300); frame.setVisible(true); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame2.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); button.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ wakeFrame(); } }); ... |
3. how to create a instance of a JFrame? forums.oracle.com |