SyntaxFix
Write A Post
Hire A Developer
Questions
If you want to hide panel on button click, write below code in JButton Action. I assume you want to hide jpanel1.
jpanel1.setVisible(false);