关于java容器,面板等自行百度学一下吧
</pre><pre name="code" class="java">private Button LogInbtn = new Button("登陆");
final static JFrame buyerpagemain = new JFrame();
final Container contentPane = buyerpagemain.getContentPane();
contentPane.add(LogInbtn);// 登陆按钮
LogInbtn.setBounds(690, 12, 40, 30);
LogInbtn.setBackground(Color.green);
LogInbtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
new LoginMain("登陆");
//buyerpagemain.dispose();
}
});
public class LoginMain extends JFrame {
public static void main(String[] args) {
new LoginMain("登陆");
}
}
具体想实现什么功能就自行实现!