Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
The workspace contains two folders by default, where:
src
: the folder to maintain sourceslib
: the folder to maintain dependencies
The JAVA PROJECTS
view allows you to manage your dependencies. More details can be found here.
bt1.addActionListener((ActionListener) this);
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==bt1)
{
this.dispose();//点击按钮时frame1销毁,new一个frame2
new Gui2();
}
}