Results 1 to 2 of 2
- 02-22-2009, 06:29 AM #1Member
- Join Date
- Feb 2009
- Rep Power
You may get better help if you post your code since that way we can see what you are doing right and what you are doing wrong. For instance, I would assume that you are adding components to a JPanel that uses the "null" layout (myPanel.setLayout(null);), but I could be wrong. You could have left the JPanel's layout alone, and thus are using the default FlowLayout.
Regardless, the most important thing that you can do here is to go to the Sun Swing tutorials and read up on the layout managers and how to use them. you are far better off not using null layout and setBounds but instead using proper layouts such as GridLayout, BorderLayout, FlowLayout, and BoxLayout. I'd avoid GridBagLayout and SpringLayout for now.
Good luck and HTH.
- By makpandian in forum AWT / SwingReplies: 1Last Post: 12-18-2008, 07:17 AM
- By beam2008 in forum AWT / SwingReplies: 1Last Post: 12-05-2008, 05:15 AM
- By rajeshgubba in forum New To JavaReplies: 4Last Post: 06-14-2008, 02:21 AM
- By impact in forum New To JavaReplies: 2Last Post: 05-04-2008, 06:41 AM
- By Echilon in forum New To JavaReplies: 0Last Post: 12-30-2007, 05:05 PM