File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java GUI development question.

 
Caitlin Gibson
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic