Thread: JFrame problem
View Single Post
  #6 (permalink)  
Old 01-11-2008, 02:25 PM
tim's Avatar
tim tim is offline
Senior Member
 
Join Date: Dec 2007
Location: South Africa
Posts: 334
tim is on a distinguished road
GUI options
Hello saytri.

What I would do, is create a JScrollPane that contains the questions. You can create a data structure to store all the labels for each question, like a Vector. Then, underneath each label you can have some component to take the input. All the components can be in the JScrollPane. This makes the program appear like a form that the user has to fill in. Then you can add a JButton underneath the JScrollPane to accept the input.

An easier approach would be to create one JLabel and one input component for input. Then, you can have a "next" JButton. When the user reaches the last question it can change to a "finnish" button.

I hope these ideas might be useful. Just ask if you need help to create a GUI.
__________________
If your ship has not come in yet then build a lighthouse.
Reply With Quote