Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 07-09-2009
Member
 
Join Date: Jul 2009
Posts: 8
Exclamation How to invoke a form from a button click using Java Swing?

Hi...Plz help how to program such that when I click a button, it invokes another form using Java Swing...
Reply With Quote
  #2  
Old 11-09-2009
Member
 
Join Date: Jan 2006
Posts: 211
Re: How to invoke a form from a button click using Java Swing?

You may use the following method in your program for the button click which will allow you to open the form on just a single click.

public NewJFrame() {
initComponents();
jButton1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
new NewJFrame1().setVisible(true);
}
});
}
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to invoke a form from a button click using Java Swing?"
Thread Thread Starter Forum Replies Last Post
How to handle JButton Click Event in Java Swing Kungfu Pandey Software Development 3 20-01-2012 12:13 PM
Print in java using Swing Sheenas Software Development 3 18-11-2009 09:50 AM
drawPolygon in java Swing? JagdishP Software Development 3 07-08-2009 11:33 PM
Message Box example for Java Swing Visala28 Software Development 3 31-07-2009 05:30 PM
Java swing help with repaint() grudge Software Development 4 23-07-2009 03:41 PM


All times are GMT +5.5. The time now is 03:19 PM.