如何使 Jframe 按钮在 Netbeans 中打开另一个 Jframe 屏幕
How to make Jframe button open another Jframe screen in Netbeans
我有一个 Jframe,我需要 link 它到另一个 Jframe 如果单击按钮,它会在单击时转到另一个 Jframe 屏幕并关闭旧屏幕。 accully 我想如果用户单击登录注册然后它会进入登录屏幕以获取登录我是新手和 bigginner 请帮助我 P.S 这是我在 Stack 的第一个问题所以忽略错误。
在 NETBEANS 中双击注册按钮或在点击事件上添加事件监听器 (ActionListener)
btnLogin.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e) {
this.setVisible(false);
new FrmMain().setVisible(true); // Main Form to show after the Login Form..
}
});
我有一个 Jframe,我需要 link 它到另一个 Jframe 如果单击按钮,它会在单击时转到另一个 Jframe 屏幕并关闭旧屏幕。 accully 我想如果用户单击登录注册然后它会进入登录屏幕以获取登录我是新手和 bigginner 请帮助我 P.S 这是我在 Stack 的第一个问题所以忽略错误。
在 NETBEANS 中双击注册按钮或在点击事件上添加事件监听器 (ActionListener)
btnLogin.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e) {
this.setVisible(false);
new FrmMain().setVisible(true); // Main Form to show after the Login Form..
}
});