File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Java GUI development question. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java GUI development question." Watch "Java GUI development question." New topic
Author

Java GUI development question.

Caitlin Gibson
Greenhorn

Joined: Nov 25, 2002
Posts: 12
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

Joined: Sep 29, 2000
Posts: 8521
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 agree. Here's the link: http://aspose.com/file-tools
 
subject: Java GUI development question.
 
Similar Threads
Starting a new frame with JComboBox?
calculation problem with applet
Setting the Background color in a panel.
calculation problem in my applet
Adding images to a JPanel based on JComboBox selection.