Results 1 to 2 of 2
- 01-14-2011, 10:01 AM #1Member
- Join Date
- Jan 2011
- Rep Power
How to open new JFrame with clicking on button?
Hi, I have another question. I need to create a "log in" window. I created username text field, password field button ok and button cancel. My question is:
What I need to do if I want that after a user enters username and password and then click button ok, that the application opens new window with some other options, new JFRame. What I need to write in buttons' ok listener?
This second window will be acting as a dialog not a separate stand-alone application, so you shouldn't be showing a second JFrame but rather a dialog window such as a JOptionPane or a JDialog. Please check out the Swing tutorials as it will explain how to create and display these better than anyone here can together with sample code.
- By geekchick in forum New To JavaReplies: 3Last Post: 08-07-2010, 08:06 PM
- By doejohn in forum New To JavaReplies: 3Last Post: 06-27-2010, 02:57 AM
- By noob in forum New To JavaReplies: 1Last Post: 03-05-2010, 09:01 PM
- By AndersBjörnör in forum AWT / SwingReplies: 2Last Post: 12-01-2009, 09:03 PM
- By busdude in forum New To JavaReplies: 4Last Post: 02-20-2009, 02:44 AM