Guest User

Untitled

a guest
Oct 17th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. String FormName;
  2. boolean formState;
  3.  
  4. public void openForm(JFrame formName){
  5.  
  6.  
  7. if (formState == false){
  8.  
  9. formName.setVisible(true);
  10.  
  11. formState = true;
  12.  
  13. }
  14. else{
  15.  
  16. JOptionPane.showMessageDialog(formName, "Form - " + formName.getTitle()+" is already open");
  17.  
  18. }
  19. }
  20.  
  21. open_Class cl = new open_Class();
  22.  
  23.  
  24.  
  25. cl.openForm(JFrame2); // Jframe2 throw an error
  26. }
Add Comment
Please, Sign In to add comment