This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi all. I wrote the following program a few days ago and I don't know how to add the following features: 1). If the fname or lname textfield contains a certain string ( such as a specific name ), create a new JButton on the frame. 2). When a student's name is selected from the combo box, lauch a new frame with a photo of that student inside the new frame along with several labels and corresponding textfields that contain the relevant information. 3). Read the JPasswordField and compare it to a hard-coded value. Here is the code:
Any help would be most appreciated, Thanks, -Caitlin. (edited by Cindy to format code using [ code][ /code] tags) [ November 26, 2002: Message edited by: Cindy Glass ]
1. Check the fname and lname fields by using getText() and then using a Regex expression to look for your string. 2. Do you have a database holding the student info? Assuming that you don't and you have a finite set of students you could use a case statement to check to see if the text of the selected student matches. Then it is just a matter of showing the image and whatnot. 3. Use the getPassword() method to find the array of bytes that makes up the Password.
"JavaRanch, where the deer and the Certified play" - David O'Meara
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com