![]() |
| ||
| line up JTextField GUI java & write to file 1 Attachment(s) Java2 homework help. Quick comment...Java was not meant for GUI! If you want GUI, then use VB. Now that I have that out of my system... Homework goal... To create a GUI java app that will save the info in the text fields to a file to a location that will be designated in the app (see attached screen shot) And yes I know the “Diisplay� tab is spelled wrong. The instructor messed it up in his instructions for the assignment and I just wanted to mess with him. ;-) How do I fix this? 2 questions 1. I put my JTextFields and JLabels in a JPanel to keep them lined up, then put the JPanels in my JFrame. I'm trying to line up all of the JPanels to the right, but when I do that, they all end up lining up in one row from left to right. To get them to stack one over the other, I have to center them all and that just doesn't look right. 2. But before the first one, I have to get this thing to write to a file (“prop.prop�). The ActionListener shown below is an example that the teacher gave us, but I'm not totally sure why it's not working. Thanks in advance, Jonboy PS Nothing is in the "Diisplay" tab b/c that is for a later assignment. He just wanted us to put it in to show that we knew how to put in tabs. package Week3; |
| ||
| Re: line up JTextField GUI java & write to file Create a JPanel with a GridLayout with 2 columns and as many rows as you have inputfields. Put the JLabels in the left column, the JTextFields in the right column. They are now lined up perfectly. What isn't the write funtion doing? And what do you expect it to do? |
| ||
| Re: line up JTextField GUI java & write to file Quote:
I have to grab the user name and password from the fields to a file in the noted server (path) and database (file name). |
| ||
| Re: line up JTextField GUI java & write to file So? Fill the properties object properly and set the correct name and path for the file... Nothing mysterious about that... |
| ||
| Re: line up JTextField GUI java & write to file Quote:
|
| ||
| Re: line up JTextField GUI java & write to file that's what that nice courseware and books you got (or should have) are for... It's such basic stuff... |
| All times are GMT -4. The time now is 10:16 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC