Panels switching on a single frame using Netbeans builder
posted 3 years ago
Please I am writing a ComputerBaseTest application with Netbeans. I have each question on a panel and I want the questions(panels) to be switched, viewing the previous and the next question on a single frame, but I do not know how. I only understand frame switching if each questn is to be on a frame but each score on each question (frame) do not sum up to give the overall score at the end of the test. Using multi-frame shows a sign of bad programming.
Please help me out.
You are right that multiple frames is a bad idea. In fact, there is a layout specifically built for such scenario - CardLayout. I would like to direct you to the tutorial to know more about the CardLayout.