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

Tags:

Sponsored Links



How to invoke a form from a button click using Java Swing?

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 07-09-2009
shelton141's Avatar
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
PARRISH's Avatar
Member
 
Join Date: Jan 2006
Posts: 174
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


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 3 Weeks Ago 12:13 PM
Applets V/s Swing in JAVA "Dritan" Software Development 3 14-12-2010 09:04 AM
Java Swing and MySQL shelton141 Software Development 1 22-09-2009 09:50 AM
drawPolygon in java Swing? JagdishP Software Development 3 08-08-2009 12:33 AM
Java swing help with repaint() grudge Software Development 4 23-07-2009 04:41 PM


All times are GMT +5.5. The time now is 07:33 AM.