Sunday, July 12, 2009

Does anyone know of a simple netbeans GUI that uses action events?

I have a program written out in c but want to conver it to java so that i can use a GUI. Can I learn how to do this within a day? How do you connect textboxes in the GUI such that when the user changes the fields in one textbox, the required textbox fields change accordingly?


Thanks

Does anyone know of a simple netbeans GUI that uses action events?
netbeans can be used to make a Java GUI.. But, once you have created the GUI, you will need to add event listeners to make things work the way you want.





In the JTextField, you can add an ActionListener which will be called once an ActionEvent is generated. In the actionPerformed method you can capture the event and then access teh other JTextfield you are interested in.


No comments:

Post a Comment