How do we connect forms in java swing?

Frame is your main building block. Have "main" JPanel with pablic method through which you can pass another JPanel for display in the frame. On the button press you just call/invoke new JPanel with form, populte it with data if need it and pass it to the "main" panel to be displayed. Do not forget toimplement some sort of bean object where you can store data from the forms till the time you either use them or just discard

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.