Re: Having trouble resizing and moving GUI components in the editor.
"Michael Ruflin" <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.user-interface |
|---|---|
| Message-ID | <[email protected]> |
Hi This question would better fit to the users mailing list. > > Sorry, can't reproduce :( > > I suggest you to try GridBagLayout. > > 1. Set the layout to GBLayout > > 2. Add all Components you want to layout > > 3. Select the Panel, right click, and choose "Customize Layout..." > > I have a problem as well. I want to create a simple form containing a > list control. I created JFrame, and then I add JList into it. No matter > what I try, the list disappears somewhere. When I select it in > Inspector, it does not show in designer. I have tried several layouts etc. Same thing as with a JTable. You have to put the JList in a JScrollPane and add the JScrollPane to a panel. Try using a BorderLayout and adding the JScrollPane to the center. This way it should work (well, at least you should be able to see the list). > Is there a tutorial about how to design a form in NetBeans? Because > every time I try it, I end up giving it up after a while. All those > layouts just fight back... on the other hand, I want to make the form > and control resizable. I would like to have something like in VB.NET, > where you just paint the controls and define how they resize with the form. I also like the way VB.Net handles forms, but I won't expect Java to support such a way in the near future. You really have to learn how to use the LayoutManagers correctly. I don't know a good tutorial for using the Netbeans form designer, but would recommend you the java tutorial (www.javasoft.com/tutorial). It explains all LayoutManagers in detail. Once you know how the LM's really work, you shouldn't have a problem using the form editor anymore. Michael