Question

Hi I am doing a small project using forms. Presently I used netbeans but my classes became very complex as all jpanel ie cards within one class which is a frame. I was asked to simplify.

My question is If I put one jpanel and it contents in one class.and make objects. Can I use cardlayout on these objects? So that cards change within a single frame?

Était-ce utile?

La solution

This problem stems from using the NetBeans GUI editor to manage the top-level container and everything in it. Instead, use the approach shown here to manage multiple separate forms that can be used in your frame's layout. See also Card Layout Actions, cited here.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top